
यह रणनीति 22 चक्र सूचकांक चलती औसत (ईएमए) के आधार पर क्रॉस सिग्नल और स्विंग पॉइंट बिट्स की एक ट्रेडिंग प्रणाली है। यह ईएमए के साथ कीमत के क्रॉसिंग के माध्यम से ट्रेडिंग सिग्नल उत्पन्न करता है और स्टॉप-लॉस पोजीशन को स्थापित करने के लिए अनुकूलित स्विंग ऊंचाई और निचले बिंदुओं का उपयोग करता है। इस पद्धति से ट्रेंड ट्रैकिंग की बुनियादी कार्यक्षमता सुनिश्चित होती है और जोखिम प्रबंधन के लिए लचीलापन बढ़ जाता है।
रणनीति के मूल तर्क में निम्नलिखित प्रमुख तत्व शामिल हैं:
यह एक पूरी तरह से संरचित, स्पष्ट रूप से तार्किक प्रवृत्ति ट्रैकिंग रणनीति है। ईएमए क्रॉसिंग के माध्यम से ट्रेडिंग सिग्नल उत्पन्न करना, एक संतुलित ट्रेडिंग सिस्टम बनाने के लिए अस्थिर बिंदु जोखिम प्रबंधन का उपयोग करना। रणनीति का मुख्य लाभ बाजार की गतिशीलता के अनुकूल होने की क्षमता में है, जबकि मुख्य जोखिम बाजार की स्थिति में परिवर्तन से आता है। प्रस्तावित अनुकूलन दिशा के माध्यम से रणनीति की स्थिरता और लाभप्रदता को और बढ़ाने की उम्मीद है।
/*backtest
start: 2024-02-21 00:00:00
end: 2025-02-18 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © GlenMabasa
//@version=6
strategy("22 EMA Crossover Strategy", overlay=true)
// Input for the EMA length
ema_length = input.int(22, title="EMA Length")
// Calculate the 22-day Exponential Moving Average
ema_22 = ta.ema(close, ema_length)
// Plot the 22 EMA
plot(ema_22, color=color.blue, title="22 EMA")
// Buy condition: Price crosses and closes above the 22 EMA
buy_condition = ta.crossover(close, ema_22) and close > ema_22
// Sell condition: Price crosses or closes below the 22 EMA
sell_condition = ta.crossunder(close, ema_22) or close < ema_22
// Swing high and swing low calculations
swing_high_length = input.int(14, title="Swing High Lookback")
swing_low_length = input.int(14, title="Swing Low Lookback")
swing_high = ta.highest(high, swing_high_length) // Previous swing high
swing_low = ta.lowest(low, swing_low_length) // Previous swing low
// Profit target and stop loss for buys
buy_profit_target = swing_high
buy_stop_loss = swing_low
// Profit target and stop loss for sells
sell_profit_target = swing_low
sell_stop_loss = swing_high
// Plot buy and sell signals
plotshape(series=buy_condition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sell_condition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Strategy logic for backtesting
if (buy_condition)
strategy.entry("Buy", strategy.long)
strategy.exit("Take Profit/Stop Loss", "Buy", limit=buy_profit_target, stop=buy_stop_loss)
if (sell_condition)
strategy.entry("Sell", strategy.short)
strategy.exit("Take Profit/Stop Loss", "Sell", limit=sell_profit_target, stop=sell_stop_loss)