
বাইবিট ইএমএ আরএসআই ট্রেন্ড ট্র্যাকিং এবং গতিশীলতা কৌশল একটি পরিমাণগত ট্রেডিং কৌশল যা সূচকীয় চলমান গড় (ইএমএ) এবং অপেক্ষাকৃত শক্তিশালী সূচক (আরএসআই) এর সমন্বয় করে। এই কৌশলটি বাজারের প্রবণতা নির্ধারণের জন্য দুটি পৃথক পিরিয়ডের ইএমএ ব্যবহার করে এবং প্রবণতার কার্যকারিতা নিশ্চিত করার জন্য আরএসআই ব্যবহার করে। যখন দ্রুত ইএমএ ধীর ইএমএ অতিক্রম করে এবং আরএসআই একটি নির্দিষ্ট নীচের সীমা থেকে কম থাকে, তখন কৌশলটি একাধিক সংকেত দেয়; বিপরীতে, যখন দ্রুত ইএমএ ধীর ইএমএ অতিক্রম করে এবং আরএসআই একটি নির্দিষ্ট উপরের সীমা অতিক্রম করে, তখন কৌশলটি খালি সংকেত দেয়। এই কৌশলটি বিবিট অ্যাকাউন্টের স্তরের উপর নির্ভর করে বিভিন্ন হ্যান্ডলিং ফি অনুপাত সেট করে এবং একটি অন্তর্নির্মিত স্টপ লস ফাংশন রয়েছে যা কার্যকরভাবে ঝুঁকি নিয়ন্ত্রণ করতে পারে।
বাইবিট ইএমএ আরএসআই ট্রেন্ড ট্র্যাকিং এবং ডায়নামিক স্ট্র্যাটেজি একটি পরিমাণযুক্ত ট্রেডিং কৌশল যা ট্রেন্ড ট্র্যাকিং এবং ডায়নামিক সূচকগুলির সমন্বয়যুক্ত ব্যবহারের মাধ্যমে বাজারের প্রবণতাকে আরও ভালভাবে ক্যাপচার করতে পারে। এই কৌশলটি অন্তর্নির্মিত স্টপ লস ফাংশন এবং বাইবিট অ্যাকাউন্টের স্তর অনুসারে রিয়াল ফি সেট করার বৈশিষ্ট্য রয়েছে, যা ঝুঁকিকে কার্যকরভাবে নিয়ন্ত্রণ করতে পারে এবং ব্যবহারকারীর বিভিন্ন ট্রেডিং অবস্থার সাথে খাপ খাইয়ে নিতে পারে। তবে, এই কৌশলটি এখনও অপ্টিমাইজ করার জন্য জায়গা রয়েছে, যেমন প্যারামিটার অপ্টিমাইজেশন, অন্যান্য প্রযুক্তিগত সূচক প্রবর্তন, স্টপ লস সেটিং অপ্টিমাইজ করা ইত্যাদি। ক্রমাগত অপ্টিমাইজেশন এবং উন্নতির মাধ্যমে এই কৌশলটি প্রকৃত ব্যবসায়ের ক্ষেত্রে আরও ভাল প্রভাব ফেলবে বলে আশা করা হচ্ছে।
/*backtest
start: 2024-03-21 00:00:00
end: 2024-03-28 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// @BryanAaron
//@version=5
strategy("Bybit EMA RSI Strategy", overlay=true)
// Input parameters
fastLength = input(90, title="Fast EMA Length")
slowLength = input(300, title="Slow EMA Length")
rsiLength = input(5, title="RSI Length")
rsiUpperThreshold = input(85, title="RSI Upper Threshold")
rsiLowerThreshold = input(45, title="RSI Lower Threshold")
takeProfitPerc = input(5, title="Take Profit %")
stopLossPerc = input(3, title="Stop Loss %")
bybitAccountLevel = input.string("VIP 0", title="Bybit Account Level", options=["VIP 0", "VIP 1", "VIP 2", "VIP 3", "VIP 4"])
// Calculate moving averages
fastMA = ta.ema(close, fastLength)
slowMA = ta.ema(close, slowLength)
// Calculate RSI
rsi = ta.rsi(close, rsiLength)
// Trading conditions
longCondition = (fastMA > slowMA) and (rsi < rsiLowerThreshold)
shortCondition = (fastMA < slowMA) and (rsi > rsiUpperThreshold)
// 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
// Calculate entry prices with commission
var float longEntryPrice = na
var float shortEntryPrice = na
longEntryPriceWithCommission = close * (1 + commissionPerc / 100)
shortEntryPriceWithCommission = close * (1 - commissionPerc / 100)
// Calculate take profit and stop loss prices
takeProfitPrice(entryPrice) => entryPrice * (1 + takeProfitPerc / 100)
stopLossPrice(entryPrice) => entryPrice * (1 - stopLossPerc / 100)
// Plot entry prices
plotchar(longCondition, title="Long Entry Price", char="LE", location=location.belowbar, color=color.green)
plotchar(shortCondition, title="Short Entry Price", char="SE", location=location.abovebar, color=color.red)
// Draw position on the chart
longColor = color.green
shortColor = color.red
profitColor = color.new(color.green, 80)
lossColor = color.new(color.red, 80)
plotshape(longCondition and strategy.position_size > 0, title="Long Position", text="Long", location=location.belowbar, style=shape.labelup, size=size.small, color=longColor, textcolor=color.white)
plotshape(shortCondition and strategy.position_size < 0, title="Short Position", text="Short", location=location.abovebar, style=shape.labeldown, size=size.small, color=shortColor, textcolor=color.white)
if (strategy.position_size > 0)
line.new(bar_index, longEntryPrice, bar_index + 1, longEntryPrice, color=longColor, width=2)
longProfitLine = line.new(bar_index, takeProfitPrice(longEntryPrice), bar_index + 1, takeProfitPrice(longEntryPrice), color=profitColor, width=1)
longLossLine = line.new(bar_index, stopLossPrice(longEntryPrice), bar_index + 1, stopLossPrice(longEntryPrice), color=lossColor, width=1)
else if (strategy.position_size < 0)
line.new(bar_index, shortEntryPrice, bar_index + 1, shortEntryPrice, color=shortColor, width=2)
shortProfitLine = line.new(bar_index, stopLossPrice(shortEntryPrice), bar_index + 1, stopLossPrice(shortEntryPrice), color=profitColor, width=1)
shortLossLine = line.new(bar_index, takeProfitPrice(shortEntryPrice), bar_index + 1, takeProfitPrice(shortEntryPrice), color=lossColor, width=1)
// Entry
if (longCondition)
strategy.entry("Long", strategy.long)
longEntryPrice := longEntryPriceWithCommission
else if (shortCondition)
strategy.entry("Short", strategy.short)
shortEntryPrice := shortEntryPriceWithCommission