
यह रणनीति एक प्रवृत्ति तोड़ने ट्रेडिंग प्रणाली है जो कई तकनीकी संकेतकों पर आधारित है। यह सूचकांक चलती औसत (ईएमए), व्यय भारित औसत मूल्य (वीडब्ल्यूएपी), अपेक्षाकृत मजबूत सूचकांक (आरएसआई) और औसत प्रवृत्ति सूचकांक (एडीएक्स) जैसे कई तकनीकी संकेतकों का व्यापक रूप से उपयोग करता है। यह रणनीति उच्च समय अवधि की प्रवृत्ति के निर्णय को जोड़ती है और एटीआर-आधारित गतिशील स्टॉप-लॉस-स्टॉप समाधान का उपयोग करती है, जिससे जोखिम पर प्रभावी नियंत्रण प्राप्त होता है।
रणनीति का मूल तर्क निम्नलिखित प्रमुख तत्वों पर आधारित है:
इस रणनीति में कई तकनीकी संकेतकों का एक साथ संयोजन किया गया है, जिससे एक अपेक्षाकृत पूर्ण ट्रेडिंग प्रणाली का निर्माण किया गया है। इसकी मुख्य विशेषता यह है कि यह बहु-आयामी सिग्नल सत्यापन के माध्यम से ट्रेडिंग की सटीकता को बढ़ाता है, जबकि वैज्ञानिक जोखिम प्रबंधन विधियों का उपयोग करके धन की सुरक्षा की रक्षा करता है। हालांकि इसकी कुछ सीमाएं हैं, लेकिन निरंतर अनुकूलन और सुधार के माध्यम से, यह रणनीति वास्तविक लेनदेन में स्थिर रिटर्न की उम्मीद करती है।
/*backtest
start: 2024-11-19 00:00:00
end: 2024-12-18 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Trend-Filtered Scalping Strategy", overlay=true, shorttitle="TFSS")
// Inputs
emaShort = input.int(9, title="EMA Short", minval=1)
emaLong = input.int(21, title="EMA Long", minval=1)
rsiLength = input.int(14, title="RSI Length", minval=1)
atrLength = input.int(14, title="ATR Length", minval=1)
adxLength = input.int(20, title="ADX Length", minval=1)
adxSmoothing = input.int(14, title="ADX Smoothing", minval=1)
volMultiplier = input.float(1.5, title="Volume Spike Multiplier", minval=1.0)
riskPercent = input.float(1, title="Risk % of Equity", minval=0.1, step=0.1)
// Higher Time Frame for Trend Filter
htfTimeframe = input.timeframe("15", title="Higher Time Frame")
ema50HTF = request.security(syminfo.tickerid, htfTimeframe, ta.ema(close, 50))
// Indicators
ema9 = ta.ema(close, emaShort)
ema21 = ta.ema(close, emaLong)
vwap = ta.vwap(close)
rsi = ta.rsi(close, rsiLength)
atr = ta.atr(atrLength)
volAvg = ta.sma(volume, 10)
// ADX Calculation with Smoothing
[_, _, adx] = ta.dmi(adxLength, adxSmoothing)
// Entry Conditions
longCondition = (ta.crossover(ema9, ema21) and close > vwap and rsi > 55 and adx > 25 and close > ema50HTF and volume > volAvg * volMultiplier)
shortCondition = (ta.crossunder(ema9, ema21) and close < vwap and rsi < 45 and adx > 25 and close < ema50HTF and volume > volAvg * volMultiplier)
// Position Sizing Based on Risk %
capitalPerTrade = (strategy.equity * (riskPercent / 100)) / atr
longStop = close - 1.5 * atr
longTarget = close + 3 * atr
shortStop = close + 1.5 * atr
shortTarget = close - 3 * atr
// Entry Logic
if longCondition and not strategy.opentrades
strategy.entry("Long", strategy.long, qty=capitalPerTrade)
strategy.exit("Exit Long", from_entry="Long", stop=longStop, limit=longTarget)
if shortCondition and not strategy.opentrades
strategy.entry("Short", strategy.short, qty=capitalPerTrade)
strategy.exit("Exit Short", from_entry="Short", stop=shortStop, limit=shortTarget)
// Alerts
alertcondition(longCondition, title="Long Entry Alert", message="Long Condition Triggered!")
alertcondition(shortCondition, title="Short Entry Alert", message="Short Condition Triggered!")
// Plot Indicators
plot(ema9, title="EMA 9", color=color.green)
plot(ema21, title="EMA 21", color=color.red)
plot(vwap, title="VWAP", color=color.blue)
plot(ema50HTF, title="HTF EMA 50", color=color.purple)
hline(55, "RSI Long Threshold", color=color.green)
hline(45, "RSI Short Threshold", color=color.red)