
এটি একটি স্বনির্ধারিত প্রবণতা ট্র্যাকিং কৌশল যা একাধিক প্রযুক্তিগত সূচক সমন্বয়ের উপর ভিত্তি করে তৈরি করা হয়েছে, যা বিভিন্ন বাজারের বৈশিষ্ট্য অনুসারে প্যারামিটারগুলিকে স্বয়ংক্রিয়ভাবে সামঞ্জস্য করতে পারে। এই কৌশলটি সিএমএফ, ডিপিও এবং কপপোকের সূচকগুলি ব্যবহার করে বাজারের প্রবণতা ক্যাপচার করে এবং অস্থিরতার সাথে সামঞ্জস্য করার জন্য ফ্যাক্টরগুলিকে সামঞ্জস্য করে। কৌশলটিতে একটি সম্পূর্ণ পজিশন ম্যানেজমেন্ট এবং ঝুঁকি নিয়ন্ত্রণ ব্যবস্থা রয়েছে, যা বাজারের অস্থিরতার গতিশীলতার উপর ভিত্তি করে লেনদেনের আকারকে সামঞ্জস্য করতে পারে।
কৌশলটির মূল যুক্তি হল ট্রেন্ডের দিকনির্দেশনা এবং ট্রেডিংয়ের সময় নির্ধারণের জন্য একাধিক সূচকের সমন্বয়।
এই কৌশলটি একটি সম্পূর্ণ প্রবণতা ট্র্যাকিং সিস্টেম, বহু-পরিমাণের সমন্বয় এবং ঝুঁকি নিয়ন্ত্রণ ব্যবস্থা দ্বারা, লাভের গ্যারান্টি দেওয়ার সাথে সাথে ঝুঁকিগুলিও ভালভাবে নিয়ন্ত্রণ করা হয়। কৌশলটি শক্তিশালী এবং অপ্টিমাইজেশনের জন্য প্রচুর জায়গা রয়েছে। এটি রিয়েল-টাইম ট্রেডিংয়ে ছোট আকারের থেকে শুরু করে ধীরে ধীরে ব্যবসায়ের আকার বাড়ানোর পরামর্শ দেওয়া হয়, একই সাথে কৌশলটির কার্যকারিতা পর্যবেক্ষণ করা এবং সময়মতো প্যারামিটারগুলি সামঞ্জস্য করা উচিত।
/*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("Multi-Market Adaptive Trading Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Input parameters
i_market_type = input.string("Crypto", "Market Type", options=["Forex", "Crypto", "Futures"])
i_risk_percent = input.float(1, "Risk Per Trade (%)", minval=0.1, maxval=100, step=0.1)
i_volatility_adjustment = input.float(1.0, "Volatility Adjustment", minval=0.1, maxval=5.0, step=0.1)
i_max_position_size = input.float(5.0, "Max Position Size (%)", minval=1.0, maxval=100.0, step=1.0)
i_max_open_trades = input.int(3, "Max Open Trades", minval=1, maxval=10)
// Indicator Parameters
i_cmf_length = input.int(20, "CMF Length", minval=1)
i_dpo_length = input.int(21, "DPO Length", minval=1)
i_coppock_short = input.int(11, "Coppock Short ROC", minval=1)
i_coppock_long = input.int(14, "Coppock Long ROC", minval=1)
i_coppock_wma = input.int(10, "Coppock WMA", minval=1)
i_atr_length = input.int(14, "ATR Length", minval=1)
// Market-specific Adjustments
volatility_factor = i_market_type == "Forex" ? 0.1 : i_market_type == "Futures" ? 1.5 : 1.0
volatility_factor *= i_volatility_adjustment
leverage = i_market_type == "Forex" ? 100.0 : i_market_type == "Futures" ? 20.0 : 3.0
// Calculate Indicators
mf_multiplier = ((close - low) - (high - close)) / (high - low)
mf_volume = mf_multiplier * volume
cmf = ta.sma(mf_volume, i_cmf_length) / ta.sma(volume, i_cmf_length)
dpo_offset = math.floor(i_dpo_length / 2) + 1
dpo = close - ta.sma(close, i_dpo_length)[dpo_offset]
roc1 = ta.roc(close, i_coppock_short)
roc2 = ta.roc(close, i_coppock_long)
coppock = ta.wma(roc1 + roc2, i_coppock_wma)
atr = ta.atr(i_atr_length)
// Define Entry Conditions
long_condition = cmf > 0 and dpo > 0 and coppock > 0 and ta.crossover(coppock, 0)
short_condition = cmf < 0 and dpo < 0 and coppock < 0 and ta.crossunder(coppock, 0)
// Calculate Position Size
account_size = strategy.equity
risk_amount = math.min(account_size * (i_risk_percent / 100), account_size * (i_max_position_size / 100))
position_size = (risk_amount / (atr * volatility_factor)) * leverage
// Execute Trades
if (long_condition and strategy.opentrades < i_max_open_trades)
sl_price = close - (atr * 2 * volatility_factor)
tp_price = close + (atr * 3 * volatility_factor)
strategy.entry("Long", strategy.long, qty=position_size)
strategy.exit("Long Exit", "Long", stop=sl_price, limit=tp_price)
if (short_condition and strategy.opentrades < i_max_open_trades)
sl_price = close + (atr * 2 * volatility_factor)
tp_price = close - (atr * 3 * volatility_factor)
strategy.entry("Short", strategy.short, qty=position_size)
strategy.exit("Short Exit", "Short", stop=sl_price, limit=tp_price)
// Plot Indicators
plot(cmf, color=color.blue, title="CMF")
plot(dpo, color=color.green, title="DPO")
plot(coppock, color=color.red, title="Coppock")
hline(0, "Zero Line", color=color.gray)
// Alerts
alertcondition(long_condition, title="Long Entry", message="Potential Long Entry Signal")
alertcondition(short_condition, title="Short Entry", message="Potential Short Entry Signal")
// // Performance reporting
// if barstate.islastconfirmedhistory
// label.new(bar_index, high, text="Strategy Performance:\nTotal Trades: " + str.tostring(strategy.closedtrades) +
// "\nWin Rate: " + str.tostring(strategy.wintrades / strategy.closedtrades * 100, "#.##") + "%" +
// "\nProfit Factor: " + str.tostring(strategy.grossprofit / strategy.grossloss, "#.##"))