
इस रणनीति का नाम है एरियल लाइटनिंग स्ट्रेचर, यह एक ट्रेंड फॉलोइंग रणनीति है जो तीन चलती औसत पर आधारित है। यह मूल्य प्रवृत्ति को निर्धारित करने के लिए फास्ट लाइन, मिडलाइन और स्लो लाइन के क्रॉसिंग की गणना करता है और एटीआर मूल्य के साथ लक्ष्य मूल्य और स्टॉप-लॉस मूल्य निर्धारित करता है।
यह रणनीति निम्नलिखित तीन चलती औसत का उपयोग करती हैः
जब तेज रेखा पर मध्य रेखा और मध्य रेखा पर धीमी रेखा पार की जाती है, तो इसे बहु-प्रवृत्ति के रूप में माना जाता है; जब तेज रेखा के नीचे मध्य रेखा पार की जाती है और मध्य रेखा के नीचे धीमी रेखा पार की जाती है, तो इसे शून्य प्रवृत्ति के रूप में माना जाता है।
कुछ शोर ट्रेडों को फ़िल्टर करने के लिए, रणनीति में कई सहायक शर्तें भी शामिल हैंः
इन शर्तों को पूरा करने पर, एक अधिक या कम करने का संकेत दिया जाएगा। केवल एक स्थिति रखने के बाद, स्थिति को फिर से खोला जा सकता है, या स्थिति को बंद कर दिया जा सकता है।
एटीआर मूल्य के आधार पर लक्ष्य मूल्य और स्टॉप-लॉस मूल्य का एक निश्चित गुणांक सेट करें।
इस रणनीति के निम्नलिखित फायदे हैं:
इस रणनीति के साथ निम्नलिखित जोखिम भी हैं:
जोखिम को नियंत्रित करने के लिए, यह अनुशंसा की जाती है कि एटीआर गुणांक को अनुकूलित करने के लिए और एकल नुकसान से बचने के लिए अधिकतम होल्डिंग समय निर्धारित करने के लिए उचित रूप से चलती औसत मापदंडों को समायोजित किया जाए।
इस रणनीति को निम्नलिखित पहलुओं से अनुकूलित किया जा सकता हैः
इस रणनीति में एक स्थिर प्रवृत्ति का पालन करने की रणनीति है। यह मुख्य रूप से प्रवृत्ति की दिशा का निर्धारण करने के लिए चलती औसत पर निर्भर करता है, और कुछ तकनीकी संकेतकों के समूह के सहयोग से सहायक है, जो कुछ शोर को फ़िल्टर कर सकता है। हालांकि अभी भी आगे के अनुकूलन के लिए जगह है, लेकिन समग्र जोखिम नियंत्रित है, जो मध्यम-लंबी प्रवृत्ति का पालन करने के लिए उपयुक्त है।
/*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)