
এটি একটি গড় সত্যিকারের ব্যাপ্তি (ATR) ভিত্তিক ট্রেন্ড ট্র্যাকিং কৌশল যা একাধিক প্রযুক্তিগত সূচকের সমন্বয়ে উচ্চ-সম্ভাব্যতা ট্রেডিংয়ের লক্ষ্যে তৈরি করা হয়েছে। এটি ATR ফিল্টারিং, সুপার ট্রেন্ডিং সূচক, সূচকীয় মুভিং এভারেজ (EMA) এবং সহজ মুভিং এভারেজ (SMMA) ট্রেন্ডিং ব্যান্ড, তুলনামূলকভাবে দুর্বল সূচক (RSI) নিশ্চিতকরণ এবং একটি গতিশীল স্টপ লস সিস্টেমকে একত্রিত করে, যা একটি বিস্তৃত এবং নমনীয় ট্রেডিং পদ্ধতি প্রদান করে।
কৌশলটির মূল নীতিগুলি একাধিক প্রযুক্তিগত সূচকগুলির সমন্বয়মূলক কার্যকারিতার উপর ভিত্তি করেঃ
প্রবণতা সনাক্তকরণঃ সুপার ট্রেন্ডিং সূচক ((প্যারামিটারঃ ফ্যাক্টর ২, দৈর্ঘ্য 5) এবং 50 দিনের ইএমএ এবং 8 দিনের এসএমএমএ প্রবণতা ব্যবহার করে বাজার প্রবণতার দিকনির্দেশনা নির্ধারণ করুন। প্রবণতা রঙিন কোডেডঃ
এটিআর স্মার্ট ফিল্টারঃ ১৪-চক্রের এটিআর এবং ৫০-চক্রের সরল চলমান গড়ের মাধ্যমে অস্থিরতা বিস্তার সনাক্ত করে, এটিআর বৃদ্ধি বা তার এসএমএর ১০১% এর বেশি হলেই ট্রেড করুন, কেবলমাত্র শক্তিশালী প্রবণতার মধ্যে প্রবেশ নিশ্চিত করুন।
ভর্তির শর্ত:
ডায়নামিক স্টপ লস এবং স্টপ স্টপঃ
এটি একটি উন্নত প্রবণতা ট্র্যাকিং কৌশল যা মাল্টি-ইনডিকেটর সমন্বয় এবং গতিশীল ঝুঁকি ব্যবস্থাপনার মাধ্যমে ব্যবসায়ীদের জন্য একটি নমনীয় এবং শক্তিশালী ট্রেডিং সরঞ্জাম সরবরাহ করে। ক্রমাগত প্রতিক্রিয়া এবং অপ্টিমাইজেশন এই কৌশলটি সফলভাবে প্রয়োগ করার মূল চাবিকাঠি।
/*backtest
start: 2024-03-31 00:00:00
end: 2025-03-29 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=6
strategy("Optimized ATR-Based Trend Strategy v6 (Fixed Trend Capture)", overlay=true)
// 🔹 Input parameters
lengthSMMA = input(8, title="SMMA Length")
lengthEMA = input(50, title="EMA Length")
supertrendFactor = input(2.0, title="Supertrend Factor")
supertrendLength = input(5, title="Supertrend Length")
atrLength = input(14, title="ATR Length")
atrSmoothing = input(50, title="ATR Moving Average Length")
atrMultiplierTP = input.float(5.0, title="ATR Multiplier for Take-Profit", minval=1.0, step=0.5)
atrMultiplierTSL = input.float(3.5, title="ATR Multiplier for Trailing Stop-Loss", minval=1.0, step=0.5) // 🔹 Increased to ride trends
atrStopMultiplier = input.float(0.8, title="ATR Stop Multiplier", minval=0.5, step=0.1)
breakEvenMultiplier = input.float(2.0, title="Break-Even Trigger ATR Multiplier", minval=1.0, step=0.1)
rsiLength = input(14, title="RSI Length")
// 🔹 Indicator calculations
smma8 = ta.sma(ta.sma(close, lengthSMMA), lengthSMMA)
ema50 = ta.ema(close, lengthEMA)
// 🔹 Supertrend Calculation
[superTrend, _] = ta.supertrend(supertrendFactor, supertrendLength)
// 🔹 Supertrend Conditions
isBullishSupertrend = close > superTrend
isBearishSupertrend = close < superTrend
// 🔹 ATR Calculation for Smarter Filtering
atrValue = ta.atr(atrLength)
atrMA = ta.sma(atrValue, atrSmoothing)
atrRising = ta.rising(atrValue, 3) // 🔹 More sensitive ATR detection
isTrending = atrValue > atrMA * 1.01 or atrRising // 🔹 Loosened ATR filter
// 🔹 RSI Calculation
rsi = ta.rsi(close, rsiLength)
// 🔹 RSI Conditions (More Flexible)
isRSIBullish = rsi > 45 // 🔹 Lowered to capture early trends
isRSIBearish = rsi < 45
// 🔹 TP Lock Mechanism
var bool tpHit = false
if strategy.position_size == 0 and strategy.closedtrades > 0
tpHit := true
// 🔹 Supertrend Flip Detection (Resumes Trading After Trend Change)
trendFlip = (isBullishSupertrend and not isBullishSupertrend[1]) or (isBearishSupertrend and not isBearishSupertrend[1])
if trendFlip
tpHit := false
// 🔹 Entry Conditions
bullishEntry = close > ema50 and isBullishSupertrend and isRSIBullish and isTrending and not tpHit
bearishEntry = close < ema50 and isBearishSupertrend and isRSIBearish and isTrending and not tpHit
// 🔹 Dynamic Take-Profit, Stop-Loss, and Break-Even Stop
longTakeProfit = close + (atrValue * atrMultiplierTP)
shortTakeProfit = close - (atrValue * atrMultiplierTP)
longTrailStop = atrValue * atrMultiplierTSL
shortTrailStop = atrValue * atrMultiplierTSL
// ✅ Adjusted SL to Reduce Drawdown
longStopLoss = close - (atrValue * atrMultiplierTSL * atrStopMultiplier)
shortStopLoss = close + (atrValue * atrMultiplierTSL * atrStopMultiplier)
// ✅ Break-Even Stop Trigger (More Room for Trends)
longBreakEven = strategy.position_avg_price + (atrValue * breakEvenMultiplier)
shortBreakEven = strategy.position_avg_price - (atrValue * breakEvenMultiplier)
// 🔹 Strategy Execution (Fixed Take-Profit & Stop-Loss)
if (bullishEntry)
strategy.entry("Buy", strategy.long)
strategy.exit("TSL/TP", from_entry="Buy", stop=longStopLoss, trail_offset=longTrailStop, limit=longTakeProfit)
strategy.exit("BreakEven", from_entry="Buy", stop=longBreakEven)
if (bearishEntry)
strategy.entry("Sell", strategy.short)
strategy.exit("TSL/TP", from_entry="Sell", stop=shortStopLoss, trail_offset=shortTrailStop, limit=shortTakeProfit)
strategy.exit("BreakEven", from_entry="Sell", stop=shortBreakEven)
// 🔹 Trend Band
trendColor = isBullishSupertrend and smma8 > ema50 and close > ema50 ? color.green :
isBearishSupertrend and smma8 < ema50 and close < ema50 ? color.red : color.gray
fill(plot(smma8, color=color.new(trendColor, 60), title="8 SMMA Band"),
plot(ema50, color=color.new(trendColor, 60), title="50 EMA Band"),
color=color.new(trendColor, 80), title="Trend Band")
// 🔹 Supertrend Line
plot(superTrend, color=color.gray, title="Supertrend", style=plot.style_line)