
এই কৌশলটি একটি ট্রেডিং সিস্টেম যা প্রবণতা অনুসরণ করে যা বুলিন ব্রেক এবং স্ট্রিং ফর্ম্যাটগুলির উপর ভিত্তি করে। কৌশলটি তিনটি ক্রমাগত বুলিন ব্রেকিং স্ট্রিং সনাক্ত করে এবং স্ট্রিং এন্ট্রিতে ক্লোজ-আপ মূল্যের সাথে সংযুক্ত করে ট্রেডিং সংকেত নির্ধারণ করে। সিস্টেমটি প্রতিটি লেনদেনের স্টপ এবং স্টপ পরিচালনার জন্য একটি নির্দিষ্ট 1: 1 ঝুঁকি-লাভের অনুপাত ব্যবহার করে।
কৌশলটির মূল যুক্তি নিম্নলিখিত মূল উপাদানগুলির উপর ভিত্তি করে:
এটি একটি কাঠামোগত, যুক্তিসঙ্গতভাবে সুস্পষ্ট প্রবণতা ট্র্যাকিং কৌশল। বুলিন বন্ডের ব্রেকডাউন এবং থ্রিলার ফর্ম্যাটের একাধিক নিশ্চিতকরণ প্রক্রিয়া দ্বারা, মিথ্যা সংকেতের ঝুঁকি কার্যকরভাবে হ্রাস করা হয়েছে। স্থির ঝুঁকি-লাভের অনুপাত সেটিং ট্রেডিং পরিচালনা সহজ করে তোলে, তবে কৌশলটির নমনীয়তাও সীমাবদ্ধ করে। প্যারামিটার সেটিং অপ্টিমাইজ করা, নিশ্চিতকরণ সূচক যুক্ত করা, পজিশন পরিচালনার উন্নতি করা ইত্যাদির মাধ্যমে কৌশলটির এখনও অনেক উন্নতির জায়গা রয়েছে। সামগ্রিকভাবে, এটি একটি ব্যবহারিক মূল্যের মৌলিক কৌশলগত কাঠামো যা নির্দিষ্ট প্রয়োজন অনুসারে আরও উন্নত করা যেতে পারে।
/*backtest
start: 2024-02-20 00:00:00
end: 2025-02-17 08:00:00
period: 12h
basePeriod: 12h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("Bollinger Band Strategy (Close Near High/Low Relative to Half Range)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=200, pyramiding=0)
// Bollinger Bands
length = input.int(20, "BB Length")
mult = input.float(2.0, "BB StdDev")
basis = ta.sma(close, length)
upper_band = basis + mult * ta.stdev(close, length)
lower_band = basis - mult * ta.stdev(close, length)
// Plot Bollinger Bands
plot(upper_band, "Upper Band", color.blue)
plot(lower_band, "Lower Band", color.red)
// Buy Condition:
// 1. Last 3 candles close above upper band AND close > open for all 3 candles
// 2. Close is in the top half of the candle's range (close > (high + low) / 2)
buyCondition = close[2] > upper_band[2] and close[1] > upper_band[1] and close > upper_band and close[2] > open[2] and close[2] > (high[2] + low[2]) / 2 and close[1] > open[1] and close[1] > (high[1] + low[1]) / 2 and close > open and close > (high + low) / 2
// Sell Condition:
// 1. Last 3 candles close below lower band AND close < open for all 3 candles
// 2. Close is in the bottom half of the candle's range (close < (high + low) / 2)
sellCondition = close[2] < lower_band[2] and close[1] < lower_band[1] and close < lower_band and close[2] < open[2] and close[2] < (high[2] + low[2]) / 2 and close[1] < open[1] and close[1] < (high[1] + low[1]) / 2 and close < open and close < (high + low) / 2
// Initialize variables
var float stop_loss = na
var float target_price = na
// Buy Logic
if buyCondition and strategy.position_size == 0
stop_loss := low[2] // Low of the earliest candle in the 3-candle sequence
target_price := close + (close - stop_loss) // Risk-to-reward 1:1
strategy.entry("Buy", strategy.long)
strategy.exit("Exit Buy", "Buy", stop=stop_loss, limit=target_price)
label.new(bar_index, low, "▲", color=color.green, style=label.style_label_up, yloc=yloc.belowbar)
// Sell Logic
if sellCondition and strategy.position_size == 0
stop_loss := high[2] // High of the earliest candle in the 3-candle sequence
target_price := close - (stop_loss - close) // Risk-to-reward 1:1
strategy.entry("Sell", strategy.short)
strategy.exit("Exit Sell", "Sell", stop=stop_loss, limit=target_price)
label.new(bar_index, high, "▼", color=color.red, style=label.style_label_down, yloc=yloc.abovebar)
// Plotting
plot(upper_band, "Upper Band", color.blue)
plot(lower_band, "Lower Band", color.red)
plot(strategy.position_size > 0 ? stop_loss : na, "Buy SL", color.red, 2, plot.style_linebr)
plot(strategy.position_size > 0 ? target_price : na, "Buy Target", color.green, 2, plot.style_linebr)
plot(strategy.position_size < 0 ? stop_loss : na, "Sell SL", color.red, 2, plot.style_linebr)
plot(strategy.position_size < 0 ? target_price : na, "Sell Target", color.green, 2, plot.style_linebr)