
यह रणनीति एक प्रवृत्ति उलटा व्यापार प्रणाली है जो MACD स्तंभ आरेख पर आधारित है। यह K-लाइन आकार परिवर्तन और MACD स्तंभ आरेख की गतिशीलता परिवर्तन के बीच संबंधों का विश्लेषण करके बाजार उलटा संकेतों को पकड़ता है। रणनीति का मुख्य विचार बाजार में गतिशीलता में गिरावट के संकेत होने पर उलटा व्यापार करना है, जिससे प्रवृत्ति पलटने पर अग्रिम रूप से तैनात किया जा सके।
रणनीति के लिए ट्रेडिंग तर्क दो दिशाओं में विभाजित है, जो है - लाभांश और प्लसः खाली करने की स्थितिः जब एक बड़ी सूर्य रेखा (खोलने की कीमत खोलने की कीमत से अधिक है) होती है, और इसकी इकाई पहले की K लाइन से बड़ी होती है, और MACD स्तंभों के चार्ट में लगातार 3 चक्रों के लिए गिरावट की प्रवृत्ति होती है, तो यह दर्शाता है कि ऊपरी गतिशीलता कमजोर हो रही है, सिस्टम एक खाली करने का संकेत देता है। बहु-शर्तः जब एक बड़ी नकारात्मक रेखा होती है ((बंद कीमत खुली कीमत से कम है), और इसकी इकाई पिछले K लाइन से बड़ी है, और MACD स्तंभ चार्ट लगातार 3 चक्रों के लिए एक उछाल की प्रवृत्ति दिखाता है, तो यह दर्शाता है कि गिरावट की गति कमजोर हो रही है, सिस्टम एक बहु-संकेत देता है। पोजीशन मैनेजमेंट प्रतिद्वंद्वी सिग्नल पोजीशन मैकेनिज्म का उपयोग करता है, यानी जब विपरीत दिशा में व्यापार सिग्नल होता है, तो मौजूदा पोजीशन को पोजीशन से बाहर कर दिया जाता है। रणनीति स्टॉप और स्टॉप लॉस सेट नहीं करती है, पूरी तरह से सिग्नल पर निर्भर रहती है।
इस रणनीति के K-लाइन के आकार और MACD स्तंभ गतिशीलता के परिवर्तन के संयोजन के माध्यम से बाजार पलटाव के अवसर को पकड़ने के लिए, संचालित करने के लिए सरल, संकेत स्पष्ट है. हालांकि कुछ जोखिम है, उचित अनुकूलन और जोखिम प्रबंधन उपायों के माध्यम से रणनीति की स्थिरता और लाभप्रदता में काफी वृद्धि की जा सकती है. रणनीति विशेष रूप से प्रवृत्ति स्पष्ट बाजार वातावरण के लिए उपयुक्त है, और व्यापार प्रणाली के एक महत्वपूर्ण घटक के रूप में कार्य कर सकते हैं.
/*backtest
start: 2024-11-10 00:00:00
end: 2025-02-19 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("MACD Momentum Reversal Strategy", overlay=true, initial_capital=100000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === MACD Calculation ===
fastLength = input.int(12, "MACD Fast Length")
slowLength = input.int(26, "MACD Slow Length")
signalLength = input.int(9, "MACD Signal Length")
[macdLine, signalLine, histLine] = ta.macd(close, fastLength, slowLength, signalLength)
// === Candle Properties ===
bodySize = math.abs(close - open)
prevBodySize = math.abs(close[1] - open[1])
candleBigger = bodySize > prevBodySize
bullishCandle = close > open
bearishCandle = close < open
// === MACD Momentum Conditions ===
// For bullish candles: if the MACD histogram (normally positive) is decreasing over the last 3 bars,
// then the bullish momentum is fading – a potential short signal.
macdLossBullish = (histLine[2] > histLine[1]) and (histLine[1] > histLine[0])
// For bearish candles: if the MACD histogram (normally negative) is increasing (moving closer to zero)
// over the last 3 bars, then the bearish momentum is fading – a potential long signal.
macdLossBearish = (histLine[2] < histLine[1]) and (histLine[1] < histLine[0])
// === Entry Conditions ===
// Short entry: Occurs when the current candle is bullish and larger than the previous candle,
// while the MACD histogram shows fading bullish momentum.
enterShort = bullishCandle and candleBigger and macdLossBullish
// Long entry: Occurs when the current candle is bearish and larger than the previous candle,
// while the MACD histogram shows fading bearish momentum.
enterLong = bearishCandle and candleBigger and macdLossBearish
// === Plot the MACD Histogram for Reference ===
plot(histLine, title="MACD Histogram", color=color.blue, style=plot.style_histogram)
// === Strategy Execution ===
// Enter positions based on conditions. There is no stop loss or take profit defined;
// positions remain open until an opposite signal occurs.
if (enterShort)
strategy.entry("Short", strategy.short)
if (enterLong)
strategy.entry("Long", strategy.long)
// Exit conditions: close an existing position when the opposite signal appears.
if (strategy.position_size > 0 and enterShort)
strategy.close("Long")
if (strategy.position_size < 0 and enterLong)
strategy.close("Short")