
এই কৌশলটি একটি সমন্বিত ট্রেডিং সিস্টেম যা ব্রিনব্যান্ড, আরএসআই সূচক এবং চলমান গড়ের উপর ভিত্তি করে। কৌশলটি সম্ভাব্য ট্রেডিং সুযোগগুলিকে ব্রিনব্যান্ডের দামের অস্থিরতার পরিধি, আরএসআই ওভারবয় ওভারসেল স্তর এবং ইএমএ প্রবণতা ফিল্টারিংয়ের মাধ্যমে চিহ্নিত করে। সিস্টেমটি ওভার এবং ডাইরেক্ট ট্রেডিং সমর্থন করে এবং তহবিল সুরক্ষার জন্য একাধিক প্রস্থান ব্যবস্থা সরবরাহ করে।
কৌশলটি মূলত নিম্নলিখিত মূল উপাদানগুলির উপর ভিত্তি করে:
এটি একটি ভালভাবে পরিকল্পিত পরিমাণগত ট্রেডিং কৌশল যা একাধিক প্রযুক্তিগত সূচকগুলির সমন্বয় দ্বারা বাজারের সুযোগগুলি ক্যাপচার করে। কৌশলটি শক্তিশালীভাবে কনফিগারযোগ্য এবং বিভিন্ন ট্রেডিং চাহিদার সাথে খাপ খাইয়ে নিতে পারে। যদিও কিছু অন্তর্নিহিত ঝুঁকি রয়েছে তবে প্যারামিটার অপ্টিমাইজেশন এবং সহায়ক সূচক যুক্ত করে এর স্থায়িত্ব এবং নির্ভরযোগ্যতা আরও বাড়ানো যেতে পারে।
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-11 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Bollinger Bands Scalp Pro", overlay=true)
// Inputs for the strategy
length = input(20, title="Bollinger Band Length")
src = input(close, title="Source")
mult = input(1.8, title="Bollinger Band Multiplier")
rsiLength = input(7, title="RSI Length")
rsiOverbought = input(75, title="RSI Overbought Level")
rsiOversold = input(25, title="RSI Oversold Level")
// Custom RSI exit points
rsiExitLong = input(75, title="RSI Exit for Long (Overbought)")
rsiExitShort = input(25, title="RSI Exit for Short (Oversold)")
// Moving Average Inputs
emaLength = input(500, title="EMA Length")
enableEMAFilter = input.bool(true, title="Enable EMA Filter")
// Exit method: Choose between 'RSI' and 'Bollinger Bands'
exitMethod = input.string("RSI", title="Exit Method", options=["RSI", "Bollinger Bands"])
// Enable/Disable Long and Short trades
enableLong = input.bool(true, title="Enable Long Trades")
enableShort = input.bool(false, title="Enable Short Trades")
// Enable/Disable Stop Loss
enableStopLoss = input.bool(false, title="Enable Stop Loss")
stopLossPercent = input.float(1.0, title="Stop Loss Percentage (%)", minval=0.1) / 100
// Bollinger Bands calculation
basis = ta.sma(src, length)
dev = mult * ta.stdev(src, length)
upperBB = basis + dev
lowerBB = basis - dev
// RSI calculation
rsi = ta.rsi(src, rsiLength)
// 200 EMA to filter trades (calculated but only used if enabled)
ema200 = ta.ema(src, emaLength)
// Long condition: RSI below oversold, price closes below the lower Bollinger Band, and optionally price is above the 200 EMA
longCondition = enableLong and (rsi < rsiOversold) and (close < lowerBB) and (not enableEMAFilter or close > ema200)
if (longCondition)
strategy.entry("Long", strategy.long)
// Short condition: RSI above overbought, price closes above the upper Bollinger Band, and optionally price is below the 200 EMA
shortCondition = enableShort and (rsi > rsiOverbought) and (close > upperBB) and (not enableEMAFilter or close < ema200)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Stop Loss setup
if (enableStopLoss)
strategy.exit("Long Exit", "Long", stop = strategy.position_avg_price * (1 - stopLossPercent))
strategy.exit("Short Exit", "Short", stop = strategy.position_avg_price * (1 + stopLossPercent))
// Exit conditions based on the user's choice of exit method
if (exitMethod == "RSI")
// Exit based on RSI
exitLongCondition = rsi >= rsiExitLong
if (exitLongCondition)
strategy.close("Long")
exitShortCondition = rsi <= rsiExitShort
if (exitShortCondition)
strategy.close("Short")
else if (exitMethod == "Bollinger Bands")
// Exit based on Bollinger Bands
exitLongConditionBB = close >= upperBB
if (exitLongConditionBB)
strategy.close("Long")
exitShortConditionBB = close <= lowerBB
if (exitShortConditionBB)
strategy.close("Short")