
এই কৌশলটি একটি মাল্টি-টেকনিকাল সূচক ভিত্তিক ট্রেডিং ট্র্যাকিং সিস্টেম যা ব্রিনের বেন্ড, ট্রেন্ডিং সূচক, গতিশীলতা সূচক এবং অস্থিরতার সূচককে একত্রিত করে, যা পরিমাণের সাথে মিলিত করে ট্রেডিং সিদ্ধান্ত নেওয়ার জন্য। কৌশলটি ব্রিনের বেন্ডের ব্রেকিংকে প্রাথমিক প্রবেশের সংকেত হিসাবে ব্যবহার করে, পাশাপাশি এডিএক্স প্রবণতা শক্তির নিশ্চিতকরণ এবং ট্রেডিং ভলিউম ব্রেকিং যাচাইয়ের সাথে মিলিত হয়, এমএসিডি এবং এটিআর ট্রেইলিং স্টপকে একটি প্রস্থান ব্যবস্থা হিসাবে ব্যবহার করে।
কৌশলটির মূল যুক্তি নিম্নলিখিত দিকগুলির উপর ভিত্তি করে:
এটি একটি নিখুঁতভাবে পরিকল্পিত বহু-পরিদর্শক প্রবণতা ট্র্যাকিং কৌশল যা ব্রিনব্যান্ড, এডিএক্স, সুপারট্রেন্ড এবং এমএসিডি ইত্যাদি সূচকগুলির জৈবিক সংমিশ্রণের মাধ্যমে প্রবণতা ট্র্যাকিং এবং ঝুঁকি নিয়ন্ত্রণের সাথে একটি ট্রেডিং সিস্টেম তৈরি করে। কৌশলটির সুবিধাটি একাধিক সংকেত স্বীকৃতি এবং উন্নত ঝুঁকি নিয়ন্ত্রণ ব্যবস্থা রয়েছে, তবে এটি অতিরিক্ত অপ্টিমাইজেশন এবং প্যারামিটার সংবেদনশীলতার চ্যালেঞ্জের মুখোমুখি। ক্রমাগত অপ্টিমাইজেশন এবং বাজারের পরিবেশের গতিশীল অভিযোজন দ্বারা, কৌশলটি বিভিন্ন বাজারের পরিস্থিতিতে স্থিতিশীল পারফরম্যান্স বজায় রাখার সম্ভাবনা রয়েছে।
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-10 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Nifty Options Trendy Markets with TSL", overlay=true)
// Input Parameters
lengthBB = input(20, title="Bollinger Bands Length")
multBB = input(2.0, title="Bollinger Bands Multiplier")
adxLength = input(14, title="ADX Length")
adxThreshold = input(25, title="ADX Entry Threshold")
adxExitThreshold = input(20, title="ADX Exit Threshold")
superTrendLength = input(10, title="Supertrend Length")
superTrendMultiplier = input(3.0, title="Supertrend Multiplier")
macdFast = input(12, title="MACD Fast Length")
macdSlow = input(26, title="MACD Slow Length")
macdSignal = input(9, title="MACD Signal Length")
atrLength = input(14, title="ATR Length")
atrMultiplier = input(1.5, title="Trailing Stop ATR Multiplier")
volumeSpikeMultiplier = input(1.5, title="Volume Spike Multiplier")
// Calculations
[macdLine, signalLine,_ ] = ta.macd(close, macdFast, macdSlow, macdSignal)
macdCrossover = ta.crossover(macdLine, signalLine)
macdCrossunder = ta.crossunder(macdLine, signalLine)
[middleBB,upperBB,lowerBB] = ta.bb(close, lengthBB, multBB)
[supertrend, direction] = ta.supertrend(superTrendMultiplier,superTrendLength)
len = input.int(17, minval=1, title="DI Length")
lensig = input.int(14, title="ADX Smoothing", minval=1, maxval=50)
[diplus, diminus, adx] = ta.dmi(len, lensig)
atr = ta.atr(atrLength)
trailingStopLong = close - atr * atrMultiplier // For long trades
trailingStopShort = close + atr * atrMultiplier // For short trades
volumeSpike = volume > ta.sma(volume, 20) * volumeSpikeMultiplier
// Entry Conditions
longEntry = ta.crossover(close, upperBB) and adx > adxThreshold and volumeSpike and close > supertrend
shortEntry = ta.crossunder(close, lowerBB) and adx > adxThreshold and volumeSpike and close < supertrend
// Exit Conditions
longExit = ta.crossunder(macdLine, signalLine) or close < trailingStopLong or adx < adxExitThreshold
shortExit = ta.crossover(macdLine, signalLine) or close > trailingStopShort or adx < adxExitThreshold
// Strategy Entries and Exits
if (longEntry)
strategy.entry("Long", strategy.long)
if (shortEntry)
strategy.entry("Short", strategy.short)
if (longExit)
strategy.close("Long")
if (shortExit)
strategy.close("Short")
// Plotting
plot(supertrend, color=color.blue, style=plot.style_line, linewidth=2, title="Supertrend Line")
plot(trailingStopLong, title="Trailing Stop for Long", color=color.green, style=plot.style_line)
plot(trailingStopShort, title="Trailing Stop for Short", color=color.red, style=plot.style_line)
bgcolor(longEntry ? color.new(color.green, 90) : shortEntry ? color.new(color.red, 90) : na, title="Background for Entry")
// Alerts
alertcondition(longEntry, title="Long Entry", message="Buy Call: Long entry conditions met")
alertcondition(shortEntry, title="Short Entry", message="Buy Put: Short entry conditions met")
alertcondition(longExit, title="Long Exit", message="Exit Call: Long exit conditions met")
alertcondition(shortExit, title="Short Exit", message="Exit Put: Short exit conditions met")