
এই কৌশলটির উদ্দেশ্য হল ব্রিন ব্যান্ড (BB), মুভিং এভারেজ (MA) এবং অপেক্ষাকৃত দুর্বল সূচক (RSI) এর সমন্বয় ব্যবহার করে স্বল্পমেয়াদী মূল্যের ওঠানামা ধরা, যার ফলে মাল্টিপল ট্রেডিং করা যায়। এই কৌশলটি মাল্টিপল এন্ট্রি করা হয় যখন দামগুলি ট্র্যাকিং এবং মুভিং এভারেজের চেয়ে বেশি থাকে এবং আরএসআই সূচকটি ওভারসোল্ডের অবস্থা দেখায়। এই কৌশলটি ঝুঁকি পরিচালনা করে এবং শতকরা হার বন্ধ এবং স্টপ লস দিয়ে মুনাফা লক করে এবং কমিশনের প্রভাব বিবেচনা করার জন্য ব্যবসায়ীর বিবিআইটি অ্যাকাউন্টের স্তরের উপর ভিত্তি করে এন্ট্রি পয়েন্টের দামকে সামঞ্জস্য করে।
এই কৌশলটি নিম্নলিখিত নীতির উপর ভিত্তি করে তৈরি হয়েছেঃ
এই কৌশলটি এই তিনটি সূচককে একত্রিত করে, যখন দামগুলি ব্রিনের রেখা অতিক্রম করে এবং চলমান গড়ের উপরে থাকে এবং আরএসআই ওভারসোল্ড অঞ্চলে থাকে, তখন বাজারটি উচ্চতর হওয়ার সম্ভাবনা রয়েছে বলে মনে হয়, তাই একাধিক প্রবেশের জন্য। একই সাথে, কৌশলটি ঝুঁকি নিয়ন্ত্রণ এবং লাভের জন্য স্টপ লস এবং স্টপ প্রাইস সেট করে।
এই কৌশলটি ব্রিনব্যান্ড, চলমান গড় এবং আরএসআইয়ের সংমিশ্রণ ব্যবহার করে স্বল্পমেয়াদী মাল্টিপ্লেয়ার ট্রেডিংয়ের সুযোগগুলি সনাক্ত করে। এটি ব্রিনব্যান্ড এবং চলমান গড়ের মাধ্যমে প্রবণতা নির্ধারণ করে, ওভারসেলগুলি সনাক্ত করতে আরএসআই ব্যবহার করে এবং ঝুঁকি পরিচালনার জন্য স্টপ লস সেট করে। কৌশলটি কমিশনের প্রভাবকে বিবেচনা করে এবং ব্যবসায়ীদের বিবিআইটি অ্যাকাউন্টের স্তরের সাথে সামঞ্জস্য করে। যদিও কৌশলটির কিছু সুবিধা রয়েছে, তবুও ভুল সংকেত, বাজার ওঠানামা এবং প্রবণতা বিপরীত হওয়ার ঝুঁকি রয়েছে। ভবিষ্যতে প্যারামিটার অপ্টিমাইজেশন, মাল্টিপ্লেয়ার, ডায়নামিক স্টপ লস, অন্যান্য সূচকগুলির সংমিশ্রণ এবং অপ্টিমাইজ করা এবং তহবিল পরিচালনার দিকনির্দেশের মতো কৌশলগুলিকে উন্নত করার জন্য তাদের কার্যকারিতা এবং উপযুক্ততা উন্নত করতে পারে।
/*backtest
start: 2023-05-08 00:00:00
end: 2024-05-13 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@BryanAaron
//@version=5
strategy("Bybit . BB Short-Term Trading Strategy - Long Only", overlay=true)
// Input parameters
bbLength = input(45, title="BB Length")
bbMultiplier = input(1.0, title="BB Multiplier")
maLength = input(90, title="MA Length")
rsiLength = input(5, title="RSI Length")
rsiUpperThreshold = input(85, title="RSI Upper Threshold")
rsiLowerThreshold = input(45, title="RSI Lower Threshold")
slPerc = input(2.0, title="Stop Loss %")
tpPerc = input(4.0, title="Take Profit %")
bybitAccountLevel = input.string("VIP 0", title="Bybit Account Level", options=["VIP 0", "VIP 1", "VIP 2", "VIP 3", "VIP 4"])
// Calculate Bollinger Bands
[bbMiddle, bbUpper, bbLower] = ta.bb(close, bbLength, bbMultiplier)
// Calculate moving average
ma = ta.sma(close, maLength)
// Calculate RSI
rsi = ta.rsi(close, rsiLength)
// Trading conditions
longCondition = close > bbUpper and close > ma and rsi < rsiLowerThreshold
shortCondition = close < bbLower and close < ma and rsi > rsiUpperThreshold
// Entry and exit signals
var bool longEntry = false
var bool shortEntry = false
if (longCondition and not longEntry)
longEntry := true
shortEntry := false
else if (shortCondition and not shortEntry)
shortEntry := true
longEntry := false
else if (not longCondition and not shortCondition)
longEntry := false
shortEntry := false
// Set commission based on Bybit account level
commissionPerc = switch bybitAccountLevel
"VIP 0" => 0.075
"VIP 1" => 0.065
"VIP 2" => 0.055
"VIP 3" => 0.045
"VIP 4" => 0.035
=> 0.075
// Adjust entry prices based on commission
longEntryPrice = close * (1 + commissionPerc / 100)
shortEntryPrice = close * (1 - commissionPerc / 100)
// Calculate stop loss and take profit prices
longStopPrice = longEntryPrice * (1 - slPerc / 100)
longProfitPrice = longEntryPrice * (1 + tpPerc / 100)
shortStopPrice = shortEntryPrice * (1 + slPerc / 100)
shortProfitPrice = shortEntryPrice * (1 - tpPerc / 100)
// Plot signals
plotshape(longEntry, title="Long Entry", location=location.belowbar, style=shape.triangleup, size=size.small, color=color.green)
plotshape(shortEntry, title="Short Entry", location=location.abovebar, style=shape.triangledown, size=size.small, color=color.red)
// Entry and exit
if (longEntry)
strategy.entry("Long", strategy.long, limit=longEntryPrice, stop=longStopPrice, comment="Long Entry")
strategy.exit("Long TP/SL", from_entry="Long", limit=longProfitPrice, stop=longStopPrice, comment="Long Exit")
else if (shortEntry)
strategy.entry("Short", strategy.short, limit=shortEntryPrice, stop=shortStopPrice, comment="Short Entry")
strategy.exit("Short TP/SL", from_entry="Short", limit=shortProfitPrice, stop=shortStopPrice, comment="Short Exit")
else
strategy.close_all(comment="Close All")
// Plot Bollinger Bands
plot(bbUpper, color=color.blue, title="BB Upper")
plot(bbMiddle, color=color.orange, title="BB Middle")
plot(bbLower, color=color.blue, title="BB Lower")
// Plot moving average
plot(ma, color=color.purple, title="MA")