मूनलाइट ट्रैकर डबल ट्राएंगल ब्रेकआउट रणनीति


निर्माण तिथि: 2023-11-21 13:49:10 अंत में संशोधित करें: 2023-11-21 13:49:10
कॉपी: 0 क्लिक्स: 688
1
ध्यान केंद्रित करना
1617
समर्थक

मूनलाइट ट्रैकर डबल ट्राएंगल ब्रेकआउट रणनीति

अवलोकन

यह रणनीति एक द्वि-त्रिभुज चैनल का निर्माण करके, सुपर-ट्रेंडिंग संकेतक के साथ कीमत के ब्रेकआउट की दिशा का निर्धारण करके, एक उच्च जीत दर के साथ ट्रैक ब्रेकआउट संचालन को प्राप्त करती है। यह रणनीति ईएमए के साथ बाजार की समग्र प्रवृत्ति का निर्धारण करने के साथ-साथ बाजार में अस्थिरता के दौरान अप्रभावी व्यापार से बचने के लिए है।

रणनीति सिद्धांत

  1. तीन अलग-अलग मापदंडों के साथ एक सुपरट्रेंड सूचक का निर्माण करें, जो कीमतों के अल्पकालिक, मध्यम और दीर्घकालिक रुझान की दिशा को निर्धारित करता है।

  2. यह निर्धारित करने के लिए कि क्या कीमतें ऊपरी या निचले चैनल को तोड़ने के लिए द्वि-त्रिभुज चैनल का उपयोग करती हैं, जो लिस्ट एंट्री और एग्जिट सिग्नल के रूप में कार्य करता है।

  3. 233 चक्रों के ईएमए के साथ संयुक्त समग्र प्रवृत्ति की दिशा का आकलन करने के लिए, कीमतों को ईएमए मल्टीहेड मार्केट को तोड़ने के लिए ऊपर की ओर जाने के लिए अधिक करने की आवश्यकता होती है, और खाली बाजार को नीचे की ओर जाने के लिए खाली करने की आवश्यकता होती है।

  4. तीन सुपर ट्रेंडिंग सूचकांकों के संयोजन के माध्यम से स्टॉप और स्टॉप सिग्नल का न्याय करें। जब दो या अधिक सूचकांक रंग बदलते हैं तो स्टॉप या स्टॉप बंद करें।

रणनीतिक लाभ

  1. डबल-ट्रायंगल चैनल, बहु-समय चक्र के साथ, ट्रेंडिंग ब्रेकडाउन को सटीक रूप से पकड़ने में सक्षम है।

  2. बहु-स्तरीय फ़िल्टरिंग शर्तों से निष्क्रिय लेनदेन से बचा जा सकता है और जीत की दर में वृद्धि हो सकती है।

  3. गतिशील ट्रैक स्टॉप लॉस, वापस लेने के जोखिम को कम करता है

  4. सरल पैरामीटर सेटअप, उपयोग करने में आसान।

रणनीतिक जोखिम और अनुकूलन

  1. बड़े चक्रीय अस्थिर बाजारों में स्थिति को अक्सर खोला जा सकता है और फिर इसे रोक दिया जाता है। स्थिति खोलने की आवृत्ति को कम करने के लिए एटीआर चक्र पैरामीटर को उचित रूप से समायोजित किया जा सकता है।

  2. ईएमए चक्रों की अवधि कम होने पर, समग्र रुझानों का पता नहीं लगाया जा सकता है, और लंबे समय तक, ट्रैक करने के लिए संवेदनशील नहीं है। इष्टतम ईएमए मापदंडों को निर्धारित करने के लिए परीक्षण की सिफारिश की जाती है।

  3. स्टॉप लॉस का स्तर गतिशील रूप से बाजार में उतार-चढ़ाव की तीव्रता में परिवर्तन को ट्रैक करने में असमर्थ है और इसे मैन्युअल हस्तक्षेप के साथ समायोजित करने की आवश्यकता है। बाद में, एटीआर के साथ गतिशील स्टॉप लॉस दूरी को समायोजित करने पर विचार किया जा सकता है।

संक्षेप

चंद्रमा ट्रैकर डबल त्रिकोण ब्रेकआउट रणनीति सुपर ट्रेंड सूचक और डबल त्रिकोण चैनल के संयोजन के माध्यम से मजबूत ब्रेकआउट को सटीक रूप से कैप्चर करने में सक्षम है। साथ ही, एक बहु-स्तरीय फ़िल्टरिंग तंत्र अप्रभावी संकेतों को फ़िल्टर कर सकता है, जिसमें उच्च सफलता दर है। सरल पैरामीटर सेटिंग भी इसका उपयोग करना आसान बनाती है। बूस्टर पैरामीटर और स्टॉप लॉस डिज़ाइन को अनुकूलित करके रणनीति की ट्रैकिंग प्रभावशीलता और जोखिम नियंत्रण क्षमता को और बढ़ाया जा सकता है।

रणनीति स्रोत कोड
/*backtest
start: 2023-11-13 00:00:00
end: 2023-11-17 04:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// @version=5
// author=theasgard and moonshot-indicator (ms)
// year 2021
//
// This is a well knowen strategy by using 3 different Supertrends and a trend-defining EMA,
// feel free to play around with the settings, a backtest on 8h ETHUSDT pair brought some good results using 
// the 233EMA and investing 75% of a 10k start capital
//
// the idea is to have at least 2 supertrnds going green above the trend-EMA to go long and exit by turning 
// 2 supertrends red (idea: 1 supertrend in red could initialize a take profit)
// shorts work vice versa
// The EMA shows in green for uptrends and in red for downtrends, if it is blue no Signal will be taken because 
// the 3 supertrends are not all above or below the trendline(EMA)

strategy("ms hypertrender", overlay=true)

// set up 3 supertrendlines and colour the direction up/down
atrPeriod1 = input(10, "ATR Length 1")
factor1 = input.float(1.0, "ATR Factor 1", step = 0.01)
[supertrend1, direction1] = ta.supertrend(factor1, atrPeriod1)
upTrend1 = plot(direction1 < 0 ? supertrend1 : na, "Up Trend 1", color = color.green, style=plot.style_linebr)
downTrend1 = plot(direction1 < 0? na : supertrend1, "Down Trend 1", color = color.red, style=plot.style_linebr)

atrPeriod2 = input(11, "ATR Length 2")
factor2 = input.float(2.0, "ATR Factor 2", step = 0.01)
[supertrend2, direction2] = ta.supertrend(factor2, atrPeriod2)
upTrend2 = plot(direction2 < 0 ? supertrend2 : na, "Up Trend 2", color = color.green, style=plot.style_linebr)
downTrend2 = plot(direction2 < 0? na : supertrend2, "Down Trend 2", color = color.red, style=plot.style_linebr)

atrPeriod3 = input(12, "ATR Length 3")
factor3 = input.float(3.0, "ATR Factor 3", step = 0.01)
[supertrend3, direction3] = ta.supertrend(factor3, atrPeriod3)
upTrend3 = plot(direction3 < 0 ? supertrend3 : na, "Up Trend 1", color = color.green, style=plot.style_linebr)
downTrend3 = plot(direction3 < 0? na : supertrend3, "Down Trend 1", color = color.red, style=plot.style_linebr)

//set up the trend dividing EMA and color uptrend nutreal downtrend
len = input.int(233, minval=1, title="Trend-EMA Length")
src = input(close, title="Source")
offset = input.int(title="Offset", defval=0, minval=-500, maxval=500)

//general Bull or Bear Trend? Visualized by ema
ematrend = ta.ema(src, len)
generaluptrend = supertrend1 > ematrend and supertrend2 > ematrend and supertrend3 > ematrend
generaldowntrend = supertrend1 < ematrend and supertrend2 < ematrend and supertrend3 < ematrend
emacolor = if generaluptrend
    color.green
else if generaldowntrend
    color.red
else
    color.blue
plot(ematrend, title="EMA", color=emacolor, offset=offset)

// Bullish? min 2 supertrends green
bullish = (direction1 < 0 and direction2 < 0) or (direction1 < 0 and direction3 < 0) or (direction2 < 0 and direction3 < 0) and generaluptrend
extremebullish = direction1 < 0 and direction2 < 0 and direction3 < 0 and generaluptrend //all 3 green

// Bearish? min 2 supertrends red
bearish = (direction1 > 0 and direction2 > 0) or (direction1 > 0 and direction3 > 0) or (direction2 > 0 and direction3 > 0) and generaldowntrend
extremebearish = direction1 > 0 and direction2 > 0 and direction3 > 0 and generaldowntrend //all 3 red

// Open Long
//plotchar(((bullish and not bullish[1]) or (extremebullish and not extremebullish[1])) and (emacolor==color.green)? close : na, title = 'Start Long', char='▲', color = #80eb34, location = location.belowbar, size = size.small)

// TP 10% Long
TP10long = ((generaluptrend and bullish[1]) or (generaluptrend and extremebullish[1])) and (direction1 > 0 or direction2 > 0 or direction3 > 0)
//plotchar(TP10long and not TP10long[1]? close : na, title = 'TP on Long', char='┼', color = #ffd000, location = location.abovebar, size = size.tiny)

// Exit Long
//plotchar(extremebearish and not extremebearish[1] or bearish and not bearish[1]? close : na, title = 'Close all Longs', char='Ꭓ', color = #ff0037, location = location.abovebar, size = size.tiny)

// Open Short
//plotchar(((bearish and not bearish[1]) or (extremebearish and not extremebearish[1])) and (emacolor==color.red)? close : na, title = 'Start Short', char='▼', color = #0547e3, location = location.abovebar, size = size.small)

// TP 10% Short
TP10short = ((generaldowntrend and bearish[1]) or (generaldowntrend and extremebearish[1])) and (direction1 < 0 or direction2 < 0 or direction3 < 0)
//plotchar(TP10short and not TP10short[1]? close : na, title = 'TP on Short', char='┼', color = #ffd000, location = location.belowbar, size = size.tiny)

// Exit Short
//plotchar(extremebullish and not extremebullish[1] or bullish and not bullish[1]? close : na, title = 'Close all Shorts', char='Ꭓ', color = #ff0037, location = location.belowbar, size = size.tiny)

// Set stop loss level with input options (optional)
longLossPerc = input.float(title="Long Stop Loss (%)",
     minval=0.0, step=0.1, defval=1) * 0.01

shortLossPerc = input.float(title="Short Stop Loss (%)",
     minval=0.0, step=0.1, defval=1) * 0.01
     
// Determine stop loss price
longStopPrice  = strategy.position_avg_price * (1 - longLossPerc)
shortStopPrice = strategy.position_avg_price * (1 + shortLossPerc)

openlong = (((bullish and not bullish[1]) or (extremebullish and not extremebullish[1])) and (emacolor==color.green))
openshort = (((bearish and not bearish[1]) or (extremebearish and not extremebearish[1])) and (emacolor==color.red))
exitlong = (extremebearish and not extremebearish[1] or bearish and not bearish[1]) or TP10long
exitshort = (extremebullish and not extremebullish[1] or bullish and not bullish[1]) or TP10short
strategy.entry("buy", strategy.long, when=openlong)
strategy.entry("sell", strategy.short, when=openshort)

strategy.close("buy", when=exitlong)
strategy.close("sell", when=exitshort)

// Submit exit orders based on calculated stop loss price
if (strategy.position_size > 0)
    strategy.exit(id="Long Stop", stop=longStopPrice)

if (strategy.position_size < 0)
    strategy.exit(id="Short Stop", stop=shortStopPrice)