
এই কৌশলটি বুলিং বন্ডের উপর ভিত্তি করে তৈরি করা হয়েছে, মূল ধারণাটি হ’ল দামটি বুলিং বন্ডের ট্র্যাকিং বা ট্র্যাকিংয়ের পরে বেরিয়ে আসে, দামটি বুলিং বন্ডের অভ্যন্তরে ফিরে আসার জন্য অপেক্ষা করে, তারপরে রিটার্ন পয়েন্টে বিপর্যয়ের দিকের সাথে একই অবস্থান তৈরি করে। এই কৌশলটি বাজারের বিপর্যয়কে ধরে রাখার জন্য বুলিং বন্ডের ব্রেকিং এবং রিটার্নের সংমিশ্রণের মাধ্যমে বাজারের বিপর্যয়কে ধরে রাখার জন্য ব্যবহার করে।
বুলিন-ব্রেকিং রিটার্ন ট্রেডিং কৌশলটি একটি সহজ ব্যবহারিক পরিমাণগত ট্রেডিং কৌশল। এটি চরম পরিস্থিতির প্রতিক্রিয়া ব্যবহার করে, বুলিন-ব্রেকিং সরঞ্জামগুলির মাধ্যমে খোলার অবস্থার শর্ত তৈরি করে, প্রবণতার শুরু এবং শেষ পয়েন্টগুলিকে কিছুটা ক্যাপচার করতে সক্ষম হয় এবং ঘন ঘন বাণিজ্য নিয়ন্ত্রণ করে। একই সাথে এই কৌশলটি প্যারামিটার নির্বাচনের মতো সমস্যা রয়েছে, অস্থিরতার অধীনে দুর্বল পারফরম্যান্স, প্রবণতা বোঝার অভাব রয়েছে। বিশদটি অপ্টিমাইজ করা এবং অন্যান্য সংকেতগুলির সাথে একত্রিত হয়ে এই কৌশলটির আরও অভিযোজনযোগ্যতা এবং অনাক্রম্যতা বাড়ানোর সম্ভাবনা রয়েছে।
/*backtest
start: 2024-02-01 00:00:00
end: 2024-02-27 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy(shorttitle="BB", title="Bollinger Bands", overlay=true)
length = input.int(20, minval=1)
maType = input.string("SMA", "Basis MA Type", options = ["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"])
src = input(close, title="Source")
mult = input.float(1.7, minval=0.001, maxval=50, title="StdDev")
ma(source, length, _type) =>
switch _type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
basis = ma(src, length, maType)
dev = mult * ta.stdev(src, length)
upper = basis + dev
lower = basis - dev
offset = input.int(0, "Offset", minval = -500, maxval = 500)
plot(basis, "Basis", color=#FF6D00, offset = offset)
p1 = plot(upper, "Upper", color=#2962FF, offset = offset)
p2 = plot(lower, "Lower", color=#2962FF, offset = offset)
fill(p1, p2, title = "Background", color=color.rgb(33, 150, 243, 95))
break_up = close > upper
break_down = close < lower
inside = close > lower and close < upper
sell_condition = break_up[1] and inside
buy_condition = break_down[1] and inside
// Conditions to close trades
close_sell_condition = close > basis
close_buy_condition = close < basis
trade_condition = sell_condition or buy_condition
// Tracking the high of the breakout candle
var float peak = na
if (not trade_condition)
peak := close
if (break_up and peak < high)
peak := high
if (break_down and peak > low)
peak := low
// Entering positions
if (buy_condition)
strategy.entry("Buy", strategy.long)
if (sell_condition)
strategy.entry("Sell", strategy.short)
// Exiting positions when close crosses the basis
if (strategy.position_size > 0 and close_sell_condition) // If in a long position and close crosses above basis
strategy.close("Buy")
if (strategy.position_size < 0 and close_buy_condition) // If in a short position and close crosses below basis
strategy.close("Sell")