
এটি একটি গতিশীল এবং প্রবণতা সমন্বিত ট্রেডিং কৌশল যা একাধিক সূচক মুভিং এভারেজ (EMA), আপেক্ষিকভাবে শক্তিশালী সূচক (RSI) এবং এলোমেলো সূচক (Stochastic) এর মাধ্যমে বাজার প্রবণতা এবং গতিশীলতা সনাক্ত করে। এই কৌশলটি একটি ঝুঁকি ব্যবস্থাপনা সিস্টেমকে সমন্বিত করে যা গড় বাস্তব তরঙ্গদৈর্ঘ্য (ATR) এর উপর ভিত্তি করে, যার মধ্যে রয়েছে গতিশীল স্টপ লস, লাভের লক্ষ্য এবং ট্র্যাকিং স্টপ লস ফাংশন, যখন ঝুঁকি-ভিত্তিক অবস্থান পরিচালনার পদ্ধতি গ্রহণ করা হয়।
কৌশলটি ট্রেন্ডের দিকনির্দেশনা নির্ধারণের জন্য পাঁচটি ভিন্ন পিরিয়ডের ইএমএ ব্যবহার করে (৮,১৩,২১,৩৪,৫৫) । সংক্ষিপ্ত পিরিয়ডের ইএমএ যখন দীর্ঘ পিরিয়ডের ইএমএর উপরে থাকে, তখন এটিকে একটি উচ্চতর প্রবণতা হিসাবে চিহ্নিত করা হয়; বিপরীতে, এটি একটি নিম্নমুখী প্রবণতা। আরএসআই গতিশীলতা নিশ্চিত করতে ব্যবহৃত হয়, বিভিন্ন প্রবেশ এবং প্রস্থান থ্রেশহোল্ড সেট করে। এলোমেলো সূচকটি তৃতীয় ওভার-ফিল্টার হিসাবে কাজ করে, যা অতিরিক্ত ক্রয় বা বিক্রয় এড়াতে সহায়তা করে। ঝুঁকি ব্যবস্থাপনা সিস্টেমটি এটিআর ব্যবহার করে গতিশীল স্টপ লস (২ গুণ এটিআর) এবং লাভের লক্ষ্য (৪ গুণ এটিআর) সেট করে এবং লাভের জন্য ১.৫ গুণ এটিআর ট্র্যাকিং স্টপ লস ব্যবহার করে।
এই কৌশলটি একাধিক প্রযুক্তিগত সূচক এবং একটি উন্নত ঝুঁকি ব্যবস্থাপনা সিস্টেমের সাথে একত্রিত হয়ে একটি বিস্তৃত ট্রেডিং সমাধান সরবরাহ করে। এর মূল সুবিধাগুলি হ’ল মাল্টি-লেয়ার ফিল্টারিং প্রক্রিয়া এবং গতিশীল ঝুঁকি ব্যবস্থাপনা, তবে এখনও নির্দিষ্ট বাজারের বৈশিষ্ট্য অনুসারে অপ্টিমাইজেশন প্রয়োজন। কৌশলটি সফলভাবে বাস্তবায়নের জন্য ক্রমাগত পর্যবেক্ষণ এবং সমন্বয় প্রয়োজন, বিশেষত বিভিন্ন বাজার পরিবেশে প্যারামিটার অভিযোজনযোগ্যতা। প্রস্তাবিত অপ্টিমাইজেশনের দিকনির্দেশের মাধ্যমে, কৌশলটি তার স্থিতিশীলতা এবং লাভজনকতা আরও বাড়ানোর সম্ভাবনা রয়েছে।
/*backtest
start: 2024-11-04 00:00:00
end: 2024-12-04 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Combined Strategy (Modernized)", overlay = true)
//----------//
// MOMENTUM //
//----------//
ema8 = ta.ema(close, 8)
ema13 = ta.ema(close, 13)
ema21 = ta.ema(close, 21)
ema34 = ta.ema(close, 34)
ema55 = ta.ema(close, 55)
// Plotting EMAs for visualization
plot(ema8, color=color.red, title="EMA 8", linewidth=1)
plot(ema13, color=color.orange, title="EMA 13", linewidth=1)
plot(ema21, color=color.yellow, title="EMA 21", linewidth=1)
plot(ema34, color=color.aqua, title="EMA 34", linewidth=1)
plot(ema55, color=color.lime, title="EMA 55", linewidth=1)
longEmaCondition = ema8 > ema13 and ema13 > ema21 and ema21 > ema34 and ema34 > ema55
exitLongEmaCondition = ema13 < ema55
shortEmaCondition = ema8 < ema13 and ema13 < ema21 and ema21 < ema34 and ema34 < ema55
exitShortEmaCondition = ema13 > ema55
// ---------- //
// OSCILLATORS //
// ----------- //
rsi = ta.rsi(close, 14)
longRsiCondition = rsi < 70 and rsi > 40
exitLongRsiCondition = rsi > 70
shortRsiCondition = rsi > 30 and rsi < 60
exitShortRsiCondition = rsi < 30
// Stochastic
k = ta.stoch(close, high, low, 14)
d = ta.sma(k, 3)
longStochasticCondition = k < 80
exitLongStochasticCondition = k > 95
shortStochasticCondition = k > 20
exitShortStochasticCondition = k < 5
//----------//
// STRATEGY //
//----------//
// ATR for dynamic stop loss and take profit
atr = ta.atr(14)
stopLossMultiplier = 2
takeProfitMultiplier = 4
stopLoss = atr * stopLossMultiplier
takeProfit = atr * takeProfitMultiplier
// Trailing stop settings
trailStopMultiplier = 1.5
trailOffset = atr * trailStopMultiplier
// Risk management: dynamic position sizing
riskPerTrade = 0.01 // 1% risk per trade
positionSize = strategy.equity * riskPerTrade / stopLoss
longCondition = longEmaCondition and longRsiCondition and longStochasticCondition and strategy.position_size == 0
exitLongCondition = (exitLongEmaCondition or exitLongRsiCondition or exitLongStochasticCondition) and strategy.position_size > 0
if (longCondition)
strategy.entry("LONG", strategy.long, qty=positionSize)
strategy.exit("Take Profit Long", "LONG", stop=close - stopLoss, limit=close + takeProfit, trail_offset=trailOffset)
if (exitLongCondition)
strategy.close("LONG")
shortCondition = shortEmaCondition and shortRsiCondition and shortStochasticCondition and strategy.position_size == 0
exitShortCondition = (exitShortEmaCondition or exitShortRsiCondition or exitShortStochasticCondition) and strategy.position_size < 0
if (shortCondition)
strategy.entry("SHORT", strategy.short, qty=positionSize)
strategy.exit("Take Profit Short", "SHORT", stop=close + stopLoss, limit=close - takeProfit, trail_offset=trailOffset)
if (exitShortCondition)
strategy.close("SHORT")