
यह रणनीति एक ट्रेंड ट्रैकिंग रणनीति है, जो ऐतिहासिक नए उच्च के आधार पर और एक चंद्र रेखा औसत रेखा फ़िल्टर पर आधारित है। यह खरीद संकेतों की तलाश करने के लिए यह देखते हुए कि क्या कीमतों ने पिछले ऐतिहासिक उच्चतम बिंदु को तोड़ दिया है, जबकि 8 चक्र सरल चलती औसत ((8 एसएमए) का उपयोग करने के लिए किया जाता है। यह रणनीति डिजाइन अवधारणा “प्रवृत्ति की निरंतरता” के बाजार की विशेषता के अनुरूप है, जो विशेष रूप से मजबूत ऊपर की ओर बढ़ने वाले रुझानों के बीच बड़े स्तर के व्यवहार को पकड़ने के लिए उपयुक्त है।
इस रणनीति के मूल में दो महत्वपूर्ण तत्व शामिल हैंः
यह एक तर्कसंगत, तर्कसंगत और स्पष्ट प्रवृत्ति ट्रैकिंग रणनीति है। ऐतिहासिक नए उच्च ब्रेकडाउन और चंद्रमा की औसत रेखा के संयोजन के माध्यम से, प्रवृत्ति पर प्रभावी पकड़ की गारंटी दी जाती है और जोखिम पर उचित नियंत्रण किया जाता है। हालांकि कुछ पिछड़ेपन और झूठे ब्रेकडाउन का जोखिम है, लेकिन अनुशंसित अनुकूलन दिशा के माध्यम से, रणनीति का समग्र प्रदर्शन और भी बेहतर होने की उम्मीद है। यह रणनीति स्पष्ट रूप से प्रवृत्ति वाले बाजार के वातावरण में लागू करने के लिए विशेष रूप से उपयुक्त है और मध्यम और दीर्घकालिक निवेश के लिए एक महत्वपूर्ण संदर्भ उपकरण के रूप में कार्य कर सकती है।
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-11 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Buy Signal on Close Greater Than Previous All-Time High Strategy", overlay=true)
// Initialize the previous all-time high
var float prevAllTimeHigh = na
// Update the all-time high, excluding the current bar's high (use previous bar's high)
if (na(prevAllTimeHigh) or high[1] > prevAllTimeHigh)
prevAllTimeHigh := high[1]
// Monthly closing price and 8 SMA on monthly time frame
monthlyClose = request.security(syminfo.tickerid, "M", close)
monthlySMA = ta.sma(monthlyClose, 8)
// Variables to track the last signal type
var int lastSignal = 0 // 0 = None, 1 = Buy, 2 = Sell
// Debugging output to check the all-time high and conditions
plot(prevAllTimeHigh, color=color.blue, linewidth=1, title="Previous All-Time High")
plot(monthlySMA, color=color.green, linewidth=1, title="8 SMA (Monthly)")
// Buy signal: when the latest close is greater than the previous all-time high
buySignal = close > prevAllTimeHigh and lastSignal != 1
// Sell signal: when the monthly close is below the 8 SMA
sellSignal = monthlyClose < monthlySMA and lastSignal != 2
// Update the last signal type after triggering a signal
if (buySignal)
lastSignal := 1
if (sellSignal)
lastSignal := 2
// Execute the strategy orders
if (buySignal)
strategy.entry("Buy", strategy.long)
if (sellSignal)
strategy.close("Buy")
// Optional: Plot buy and sell signals on the chart for visual reference
plotshape(series=buySignal, style=shape.labelup, location=location.belowbar, color=color.green, text="BUY", size=size.small)
plotshape(series=sellSignal, style=shape.labeldown, location=location.abovebar, color=color.red, text="SELL", size=size.small)