
এই কৌশলটির নাম হল রঙিন বিদ্যুতের কুণ্ডলী, এটি একটি প্রবণতা অনুসরণকারী কৌশল যা তিনটি চলমান গড়ের উপর ভিত্তি করে। এটি দ্রুত, মধ্যম এবং ধীর লাইনগুলির ক্রসগুলি গণনা করে মূল্যের প্রবণতা নির্ধারণ করে এবং এটিআর মানগুলির সাথে লক্ষ্য মূল্য এবং স্টপ-ডাউন মূল্য নির্ধারণ করে।
এই কৌশলটি নিম্নলিখিত তিনটি চলমান গড় ব্যবহার করেঃ
যখন দ্রুত লাইন মধ্যম লাইন এবং মধ্যম লাইন ধীর লাইন অতিক্রম করে, তখন বিচার করা হয় মাল্টি ট্রেন্ড হিসাবে; যখন দ্রুত লাইন মধ্যম লাইন অতিক্রম করে এবং মধ্যম লাইন ধীর লাইন অতিক্রম করে, তখন বিচার করা হয় ফাঁকা ট্রেন্ড হিসাবে।
এই কৌশলটি কিছু শব্দ-বিক্রয়কে ফিল্টার করার জন্য বেশ কয়েকটি অতিরিক্ত শর্তও নির্ধারণ করেছেঃ
এই শর্তগুলি পূরণ হলে, একটি ওভার বা ডাউন সিগন্যাল পাঠানো হবে। প্রতিবার কেবলমাত্র একটি পজিশন রাখা, পজিশন বন্ধ বা বন্ধ হওয়ার পরে আবার পজিশন খোলা যেতে পারে।
লক্ষ্য মূল্য এবং স্টপ লস মূল্য ATR মানের উপর ভিত্তি করে একটি নির্দিষ্ট গুণিতক সেট করা হয়েছে।
এই কৌশলটির সুবিধাগুলো হলঃ
এই কৌশলটি নিম্নলিখিত ঝুঁকিগুলিও বহন করেঃ
ঝুঁকি নিয়ন্ত্রণের জন্য, এটিএম প্যারামিটারগুলিকে যথাযথভাবে সামঞ্জস্য করার পরামর্শ দেওয়া হয়, এটিআর গুণকগুলিকে অনুকূলিতকরণ করা হয় এবং একক ক্ষতির অত্যধিকতা এড়াতে সর্বাধিক হোল্ডিং সময় সেট করা হয়।
এই কৌশলটি নিম্নলিখিত দিকগুলি থেকে উন্নত করা যেতে পারেঃ
এই কৌশলটি সামগ্রিকভাবে একটি স্থিতিশীল প্রবণতা অনুসরণ করার কৌশল। এটি প্রধানত চলমান গড়ের উপর নির্ভর করে প্রবণতার দিকনির্দেশের উপর নির্ভর করে, এবং কিছু প্রযুক্তিগত সূচক সমন্বয় সহযোগিতার জন্য, আংশিক শব্দটি ফিল্টার করতে পারে। যদিও আরও অপ্টিমাইজেশনের জন্য এখনও জায়গা রয়েছে, তবে সামগ্রিক ঝুঁকি নিয়ন্ত্রণযোগ্য, মধ্যম এবং দীর্ঘ লাইন প্রবণতা অনুসরণ করার জন্য উপযুক্ত।
/*backtest
start: 2024-01-02 00:00:00
end: 2024-02-01 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © greenmask9
//@version=4
strategy("Dazzling Bolts", overlay=true)
//max_bars_back=3000
// 13 SMMA
len = input(10, minval=1, title="SMMA Period")
src = input(close, title="Source")
smma = 0.0
smma := na(smma[1]) ? sma(src, len) : (smma[1] * (len - 1) + src) / len
// 55 EMA
emalength = input(55, title="EMA Period")
ema = ema(close, emalength)
// 100 SMA
smalength = input(110, title="SMA Period")
sma = sma(close, smalength)
emaforce = input(title="Force trend with medium EMA", type=input.bool, defval=true)
offsetemavalue = input(defval = 6)
bullbounce = smma>ema and ema>sma and low[5]>ema and low[2]<ema and close[1]>ema and (ema[offsetemavalue]>sma or (not emaforce))
bearbounce = smma<ema and ema<sma and high[5]<ema and high[2]>ema and close[1]<ema and (ema[offsetemavalue]<sma or (not emaforce))
plotshape(bullbounce, title= "Purple", location=location.belowbar, color=#ff33cc, transp=0, style=shape.triangleup, size=size.tiny, text="Bolts")
plotshape(bearbounce, title= "Purple", location=location.abovebar, color=#ff33cc, transp=0, style=shape.triangledown, size=size.tiny, text="Bolts")
strategy.initial_capital = 50000
ordersize=floor(strategy.initial_capital/close)
longs = input(title="Test longs", type=input.bool, defval=true)
shorts = input(title="Test shorts", type=input.bool, defval=true)
atrlength = input(title="ATR length", defval=12)
atrm = input(title="ATR muliplier",type=input.float, defval=2)
atr = atr(atrlength)
target = close + atr*atrm
antitarget = close - (atr*atrm)
//limits and stop do not move, no need to count bars from since
bullbuy = bullbounce and longs and strategy.opentrades==0
bb = barssince(bullbuy)
bearsell = bearbounce and shorts and strategy.opentrades==0
bs = barssince(bearsell)
if (bullbuy)
strategy.entry("Boltsup", strategy.long, ordersize)
strategy.exit ("Bolts.close", from_entry="Boltsup", limit=target, stop=antitarget)
if (crossover(smma, sma))
strategy.close("Boltsup", qty_percent = 100, comment = "Bolts.crossover")
if (bearsell)
strategy.entry("Boltsdown", strategy.short, ordersize)
strategy.exit("Bolts.close", from_entry="Boltsdown", limit=antitarget, stop=target)
if (crossunder(smma, sma))
strategy.close("Boltsdown", qty_percent = 100, comment = "Bolts.crossover")
// if (bb<5)
// bulltarget = line.new(bar_index[bb], target[bb], bar_index[0], target[bb], color=color.blue, width=2)
// bullclose = line.new(bar_index[bb], close[bb], bar_index[0], close[bb], color=color.blue, width=2)
// bullstop = line.new(bar_index[bb], antitarget[bb], bar_index[0], antitarget[bb], color=color.blue, width=2)
// if (bs<5)
// bulltarget = line.new(bar_index[bs], antitarget[bs], bar_index[0], antitarget[bs], color=color.purple, width=2)
// bullclose = line.new(bar_index[bs], close[bs], bar_index[0], close[bs], color=color.purple, width=2)
// bullstop = line.new(bar_index[bs], target[bs], bar_index[0], target[bs], color=color.purple, width=2)