
এই কৌশলটি একটি বুদ্ধিমান ট্রেডিং সিস্টেম যা একাধিক প্রযুক্তিগত সূচকগুলির উপর ভিত্তি করে, তিনটি প্রযুক্তিগত সূচকগুলির সাথে বোলিংগার ব্যান্ডস, স্টোক্যাস্টিক ওসিলিয়েটর এবং গড় বাস্তব তরঙ্গদৈর্ঘ্য (এটিআর) এর সমন্বিত বিশ্লেষণের মাধ্যমে সম্ভাব্য ব্যবসায়ের সুযোগগুলি সনাক্ত করতে পারে। এই কৌশলটি গতিশীল স্টপ লস এবং লাভের লক্ষ্য নির্ধারণ করে, যা বাজারের অস্থিরতার সাথে সামঞ্জস্যপূর্ণ ট্রেডিং প্যারামিটারগুলিকে স্বয়ংক্রিয়ভাবে সামঞ্জস্য করতে পারে।
এই কৌশলটির কেন্দ্রীয় যুক্তিটি একটি ট্রিপল ভেরিফিকেশন পদ্ধতির উপর ভিত্তি করেঃ
ট্রেডিং সিগন্যালের জন্য নিম্নলিখিত শর্তগুলি পূরণ করতে হবেঃ ক্রয়ের শর্তাবলীঃ
বিক্রির শর্তঃ
এই কৌশলটি ব্রিনব্যান্ড, এলোমেলো সূচক এবং এটিআর এর সমন্বিত প্রয়োগের মাধ্যমে একটি সম্পূর্ণ ট্রেডিং সিস্টেম তৈরি করে। কৌশলটির সুবিধা হ’ল একাধিক সূচকের ক্রস যাচাইকরণ এবং গতিশীল ঝুঁকি ব্যবস্থাপনা, তবে একই সাথে প্যারামিটার অপ্টিমাইজেশন এবং বাজার পরিবেশের অভিযোজনযোগ্যতার বিষয়েও মনোযোগ দেওয়া প্রয়োজন। ক্রমাগত অপ্টিমাইজেশন এবং পরিমার্জন দ্বারা, কৌশলটি বাস্তব ব্যবসায়ের ক্ষেত্রে স্থিতিশীল উপার্জন প্রদর্শনের সম্ভাবনা রয়েছে।
/*backtest
start: 2025-02-13 00:00:00
end: 2025-02-19 08:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
//@version=5
strategy("Bollinger Bands + Stochastic Oscillator + ATR Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Bollinger Bands Parameters
bb_length = 20
bb_mult = 2.0
basis = ta.sma(close, bb_length)
dev = bb_mult * ta.stdev(close, bb_length)
upper_bb = basis + dev
lower_bb = basis - dev
// Stochastic Oscillator Parameters
stoch_length = 14
k_smooth = 3
d_smooth = 3
stoch_k = ta.sma(ta.stoch(close, high, low, stoch_length), k_smooth)
stoch_d = ta.sma(stoch_k, d_smooth)
// ATR Parameters
atr_length = 14
atr_mult = 1.5
atr = ta.atr(atr_length)
// ATR Threshold based on ATR Moving Average
atr_ma = ta.sma(atr, atr_length)
atr_threshold = atr_ma * atr_mult
// Plot Bollinger Bands
plot(basis, color=color.blue, title="BB Basis")
p1 = plot(upper_bb, color=color.red, title="Upper BB")
p2 = plot(lower_bb, color=color.green, title="Lower BB")
fill(p1, p2, color=color.rgb(173, 216, 230, 90), title="BB Fill")
// Plot Stochastic Oscillator
hline(80, "Overbought", color=color.orange)
hline(20, "Oversold", color=color.orange)
plot(stoch_k, color=color.purple, title="%K")
plot(stoch_d, color=color.orange, title="%D")
// Plot ATR and ATR Threshold for Visualization
hline(0, "ATR Zero Line", color=color.gray, linestyle=hline.style_dotted)
plot(atr, title="ATR", color=color.blue)
plot(atr_threshold, title="ATR Threshold", color=color.gray, style=plot.style_stepline)
// Buy Condition:
// - Price closes below the lower Bollinger Band
// - Stochastic %K crosses above %D in oversold region
// - ATR is above the ATR threshold
buyCondition = close < lower_bb and ta.crossover(stoch_k, stoch_d) and stoch_k < 20 and atr > atr_threshold
// Sell Condition:
// - Price closes above the upper Bollinger Band
// - Stochastic %K crosses below %D in overbought region
// - ATR is above the ATR threshold
sellCondition = close > upper_bb and ta.crossunder(stoch_k, stoch_d) and stoch_k > 80 and atr > atr_threshold
// Plot Buy/Sell Signals
plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Execute Trades
if (buyCondition)
strategy.entry("Long", strategy.long)
if (sellCondition)
strategy.close("Long")
// Optional: Add Stop Loss and Take Profit
// Stop Loss at ATR-based distance
stop_level = close - atr_mult * atr
take_level = close + atr_mult * atr
if (buyCondition)
strategy.exit("Take Profit/Stop Loss", from_entry="Long", stop=stop_level, limit=take_level)