
এটি ডনচিয়ান চ্যানেলের উপর ভিত্তি করে একটি মোমেন্টাম ব্রেকআউট ট্রেডিং কৌশল, যা মূল্য ব্রেকআউট এবং ভলিউম নিশ্চিতকরণের দুটি মূল শর্তকে একত্রিত করে। এই কৌশলটি বাজারের ঊর্ধ্বমুখী প্রবণতা ক্যাপচার করে মূল্য একটি পূর্বনির্ধারিত মূল্য সীমার বাইরে চলে যায় কিনা এবং ভলিউম সমর্থনের জন্য আহ্বান করে। কৌশলটি চ্যানেলের স্থায়িত্ব উন্নত করতে হিস্টেরেসিস প্যারামিটার ব্যবহার করে এবং নমনীয় প্রস্থান শর্ত নির্বাচন প্রদান করে।
কৌশলটির মূল যুক্তিতে নিম্নলিখিত মূল অংশগুলি অন্তর্ভুক্ত রয়েছে:
এটি একটি ভাল পরিকল্পিত এবং যৌক্তিক প্রবণতা অনুসরণ কৌশল. মূল্য অগ্রগতি এবং ভলিউম নিশ্চিতকরণ একত্রিত করে, কৌশলটি নির্ভরযোগ্যতা নিশ্চিত করার সাথে সাথে ভাল নমনীয়তা বজায় রাখে। কৌশলটির প্যারামেট্রিক নকশা এটিকে অত্যন্ত অভিযোজনযোগ্য করে তোলে, তবে এটির জন্য বিনিয়োগকারীদেরকে বাজারের নির্দিষ্ট অবস্থার সাথে অপ্টিমাইজ এবং সামঞ্জস্য করতেও প্রয়োজন। সামগ্রিকভাবে, এটি আরও অপ্টিমাইজেশন এবং অনুশীলনের যোগ্য একটি কৌশলগত কাঠামো।
/*backtest
start: 2019-12-23 08:00:00
end: 2025-01-15 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}]
*/
//@version=6
strategy("Breakout Strategy", overlay=true, calc_on_every_tick=false, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, pyramiding=1, fill_orders_on_standard_ohlc=true)
// Input Parameters
start_date = input(timestamp("2018-01-01 00:00"), "Start Date")
end_date = input(timestamp("2060-01-01 00:00"), "End Date")
in_time_range = true
length = input.int(27, title="Donchian Channel Length", minval=1, tooltip="Number of bars used to calculate the Donchian channel.")
lag = input.int(10, title="Donchian Channel Offset", minval=1, tooltip = "Offset to delay the Donchian channel, enhancing stability.")
volume_mult = input.float(1.4, title="Volume Multiplier", minval=0.1, step=0.1, tooltip="Multiplier for the average volume to filter breakout conditions.")
closing_condition = input.string("Mid", title="Trade Closing Band", options= ["Upper","Lower","Mid"], tooltip = "Donchian Channel Band to use for exiting trades: Upper, Lower, or Middle.") //
// Donchian Channel (Lagged for Stability)
upper_band = ta.highest(high[lag], length)
lower_band = ta.lowest(low[lag], length)
middle_band = (upper_band + lower_band) / 2
plot(upper_band, color=color.blue, title="Upper Band (Lagged)")
plot(middle_band, color=color.orange, title="Middle Band")
plot(lower_band, color=color.blue, title="Lower Band (Lagged)")
// Volume Filter
avg_volume = ta.sma(volume, length)
volume_condition = volume > avg_volume * volume_mult
// Long Breakout Condition
long_condition = close > upper_band and volume_condition
bool reverse_exit_condition = false
// Exit Condition (Close below the middle line)
if closing_condition == "Lower"
reverse_exit_condition := close < lower_band
else if closing_condition == "Upper"
reverse_exit_condition := close < upper_band
else
reverse_exit_condition := close < middle_band
// Long Strategy: Entry and Exit
if in_time_range and long_condition
strategy.entry("Breakout Long", strategy.long)
// Exit on Reverse Signal
if in_time_range and reverse_exit_condition
strategy.close("Breakout Long", comment="Reverse Exit")