
এই কৌশলটি দ্বি-সমান্তরিত ফিল্টারিং সিস্টেম এবং এটিআর স্বনির্ধারিত স্টপ ট্র্যাকিং মেশিনের সমন্বয় করে, দামের ওঠানামাকে মসৃণ করার জন্য হেইকিন আশি ম্যাপিংয়ের মাধ্যমে উচ্চ জয়লাভের প্রবণতা অনুসরণ করে। কৌশলটির মূলটি হ’ল দ্রুত ইএমএ এবং ধীর ইএমএর গোল্ডেন ফোর্কসকে ট্রেন্ড দিকনির্দেশক ফিল্টার হিসাবে ব্যবহার করা, যখন এটিআর-ভিত্তিক গতিশীল স্টপগুলি ব্যবহার করে মুনাফা সুরক্ষিত করা হয়। ইতিহাসের পুনরাবৃত্তি দেখায় যে কৌশলটি 90% এরও বেশি জয়লাভ করেছে, যা মাঝারি লাইন সংক্ষিপ্ত ট্রেন্ডিংয়ের জন্য উপযুক্ত।
সিগন্যাল জেনারেশন স্তর:
ট্রেন্ড ফিল্টার:
ঝুঁকি ব্যবস্থাপনা:
এক্সিকিউশন লজিক:
গতিশীল প্যারামিটার সমন্বয়:
যৌগিক পরিস্রাবণ ব্যবস্থা:
মেশিন লার্নিং অপ্টিমাইজেশন:
বহু-মাত্রিক প্রমাণীকরণ:
এই কৌশলটি হেইকিন আশি-এটিআর-ইএমএ ট্রিপল আর্কিটেকচারের মাধ্যমে উচ্চ-সম্ভাব্যতা প্রবণতা ক্যাপচার অর্জন করে, গতিশীল স্টপ লস মেশিনটি লাভের কার্যকর সুরক্ষা দেয়। মূল সুবিধাটি প্রবণতার দিকনির্দেশনা (ইএমএ), ওঠানামা (এটিআর) এবং গোলমাল ফিল্টারিং (হেইকিন আশি) এর জৈবিক সংহতকরণে রয়েছে। আরও অপ্টিমাইজেশনটি প্যারামিটার স্ব-অনুকূলতা এবং মাল্টি-ফ্যাক্টর যাচাইকরণের উপর জোর দেওয়া উচিত, বাস্তব প্রয়োগে কঠোরতা নিয়ন্ত্রণের নিয়মের সাথে মিলিত হওয়ার পরামর্শ দেওয়া হয়েছে।
/*backtest
start: 2025-01-01 00:00:00
end: 2025-04-23 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"DOGE_USDT"}]
*/
//@version=5
strategy("UTBot + EMA Filter (HA + ATR Logic)", overlay = true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === INPUTS ===
bandwidth = input.float(8., 'Bandwidth')
atr_mult = input.float(1.0, 'ATR Multiplier')
atr_len = input.int(20, 'ATR Length')
ema_fast_len = input.int(10, 'EMA Fast Length')
ema_slow_len = input.int(50, 'EMA Slow Length')
use_heikin = input.bool(true, title='Use Heikin Ashi Candle')
trail_step = input.float(10.0, title='Trailing Step (Points)', minval=0.1)
trail_offset = input.float(10.0, title='Trailing Offset (Points)', minval=0.1)
take_profit_points = input.float(100.0, title='Take Profit (Points)', minval=0.1)
// === SOURCE ===
sr = use_heikin ? request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close) : close
// === ATR Trailing Stop ===
atr = ta.atr(atr_len)
nLoss = atr_mult * atr
var float trail = na
iff_1 = sr > nz(trail[1]) ? sr - nLoss : sr + nLoss
iff_2 = sr < nz(trail[1]) and sr[1] < nz(trail[1]) ? math.min(nz(trail[1]), sr + nLoss) : iff_1
trail := sr > nz(trail[1]) and sr[1] > nz(trail[1]) ? math.max(nz(trail[1]), sr - nLoss) : iff_2
// === EMA FILTER ===
ema_fast = ta.ema(sr, ema_fast_len)
ema_slow = ta.ema(sr, ema_slow_len)
// === ENTRY & EXIT CONDITIONS ===
buy = sr[1] < trail[1] and sr > trail and ema_fast > ema_slow
sell = sr[1] > trail[1] and sr < trail and ema_fast < ema_slow
// === EXIT on opposite signal ===
exit_buy = sell
exit_sell = buy
// === STRATEGY EXECUTION ===
if buy
strategy.entry("Buy", strategy.long)
if sell
strategy.entry("Sell", strategy.short)
if exit_buy and strategy.position_size > 0
strategy.close("Buy")
if exit_sell and strategy.position_size < 0
strategy.close("Sell")
// === TRAILING STOP + TAKE PROFIT ===
// Long
if strategy.position_size > 0
strategy.exit("Exit Long", from_entry="Buy", trail_points=trail_step, trail_offset=trail_offset, limit=sr + take_profit_points)
// Short
if strategy.position_size < 0
strategy.exit("Exit Short", from_entry="Sell", trail_points=trail_step, trail_offset=trail_offset, limit=sr - take_profit_points)
// === PLOTS ===
plotshape(buy, title='Buy Signal', text='Buy', location=location.belowbar, color=color.green, style=shape.labelup, textcolor=color.white, size=size.tiny)
plotshape(sell, title='Sell Signal', text='Sell', location=location.abovebar, color=color.red, style=shape.labeldown, textcolor=color.white, size=size.tiny)
plot(ema_fast, color=color.teal, title='EMA Fast')
plot(ema_slow, color=color.purple, title='EMA Slow')
// === ALERTS ===
alertcondition(buy, title='UTBot Buy', message='UTBot Buy Signal')
alertcondition(sell, title='UTBot Sell', message='UTBot Sell Signal')