
এই কৌশলটি হেইকিন-আশির একটি পরিমার্জিত প্রবণতা ট্র্যাকিং সিস্টেমের উপর ভিত্তি করে তৈরি করা হয়েছে। ঐতিহ্যবাহী হেইকিন-আশির K-লাইনগুলির উপর ডাবল ইন্ডেক্সাল মুভিং এভারেজ (EMA) মসৃণকরণ দ্বারা কার্যকরভাবে বাজারের শব্দকে হ্রাস করে এবং আরও পরিষ্কার প্রবণতা সংকেত সরবরাহ করে। কৌশলটি কেবলমাত্র একাধিক পদ্ধতিতে কাজ করে, একটি উত্থান প্রবণতা এবং একটি পতনের প্রবণতা স্থির অবস্থানের জন্য, একটি কার্যকর প্রবণতা ক্যাপচার দ্বারা বাজারের লাভ অর্জনের জন্য।
কৌশলটির মূল যুক্তিতে নিম্নলিখিত মূল পদক্ষেপগুলি অন্তর্ভুক্ত রয়েছে:
এই কৌশলটি একটি শক্তিশালী প্রবণতা ট্র্যাকিং সিস্টেম তৈরি করে, যার মূল অংশটি দ্বিগুণ মসৃণকরণ এবং একটি সংশোধিত পিআইজিএএনজিএস কে লাইন। এই কৌশলটি সংক্ষিপ্ত, সহজেই বোঝা যায় এবং কার্যকর করা যায় এবং বিভিন্ন বাজার পরিস্থিতিতে অভিযোজিত হওয়ার জন্য একাধিক অপ্টিমাইজেশান দিক সরবরাহ করে। যদিও কিছু পিছিয়ে পড়া এবং প্রত্যাহারের ঝুঁকি রয়েছে, তবে যুক্তিসঙ্গত তহবিল পরিচালনা এবং ঝুঁকি নিয়ন্ত্রণের ব্যবস্থাগুলির মাধ্যমে এই কৌশলটি বিনিয়োগকারীদের জন্য একটি নির্ভরযোগ্য প্রবণতা ট্র্যাকিং সরঞ্জাম সরবরাহ করতে পারে।
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-27 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Smoothed Heiken Ashi Strategy Long Only", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
len = input.int(10, title="EMA Length")
len2 = input.int(10, title="Smoothing Length")
start_date = input(defval=timestamp("2020-01-01"), title="Backtest Start Date")
o = ta.ema(open, len)
c = ta.ema(close, len)
h = ta.ema(high, len)
l = ta.ema(low, len)
haclose = (o + h + l + c) / 4
var float haopen = na
haopen := na(haopen[1]) ? (o + c) / 2 : (haopen[1] + haclose[1]) / 2
hahigh = math.max(h, math.max(haopen, haclose))
halow = math.min(l, math.min(haopen, haclose))
o2 = ta.ema(haopen, len2)
c2 = ta.ema(haclose, len2)
h2 = ta.ema(hahigh, len2)
l2 = ta.ema(halow, len2)
col = o2 > c2 ? color.red : color.lime
// Plot candles without visible wicks
plotcandle(o2, o2, c2, c2, title="Heikin Smoothed", color=col, wickcolor=color.new(col, 100))
// Delayed Buy and Sell signals
colorChange = col != col[1]
buySignal = colorChange[1] and col[1] == color.lime
sellSignal = colorChange[1] and col[1] == color.red
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.lime, style=shape.triangleup, size=size.small)
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// Strategy entry and exit
if (true)
if (buySignal)
strategy.entry("Long", strategy.long)
if (sellSignal)
strategy.close("Long")
// Add a vertical line at the start date
// if (time == start_date)
// line.new(x1=bar_index, y1=low, x2=bar_index, y2=high, color=color.blue, width=2)
// Alert conditions
alertcondition(colorChange[1], title="Color Change Alert", message="Heiken Ashi Candle Color Changed")
alertcondition(buySignal, title="Buy Signal Alert", message="Buy Signal: Color changed from Red to Green")
alertcondition(sellSignal, title="Sell Signal Alert", message="Sell Signal: Color changed from Green to Red")