
এই কৌশলটি রিলেটিভ স্ট্রেংথ ইনডেক্স (RSI) এর উপর ভিত্তি করে একটি ট্রেন্ড রিভার্সাল ট্রেডিং সিস্টেম এটি বেশি কেনা এবং ওভারসোল্ড রেঞ্জ সেট করে বাজারের টার্নিং পয়েন্ট ক্যাপচার করে এবং ঝুঁকি নিয়ন্ত্রণের জন্য ATR ডাইনামিক স্টপ লসকে একত্রিত করে। কৌশলটির স্বতন্ত্রতা হল “নিষিদ্ধ ট্রেডিং রেঞ্জ” ধারণার প্রবর্তন, যা কার্যকরভাবে অস্থির বাজারে ঘন ঘন ট্রেডিং এড়িয়ে চলে। এই কৌশলটি বাজারের অস্থির পরিবেশের জন্য উপযুক্ত, বিশেষ করে সুস্পষ্ট প্রবণতা বৈশিষ্ট্য সহ ট্রেডিং বৈচিত্র্যের জন্য।
কৌশলটি মূলত নিম্নলিখিত মূল যুক্তির উপর ভিত্তি করে প্রয়োগ করা হয়:
এই কৌশলটি RSI রিভার্সাল সিগন্যাল এবং নিষিদ্ধ ট্রেডিং রেঞ্জের উদ্ভাবনী সমন্বয়ের মাধ্যমে ট্রেন্ড ট্রেডিংয়ে সময়ের সমস্যার সমাধান করে। ATR ডাইনামিক স্টপ লস প্রবর্তন কৌশলটির জন্য একটি নির্ভরযোগ্য ঝুঁকি নিয়ন্ত্রণ ব্যবস্থা প্রদান করে। যদিও কৌশলটির এখনও কিছু সম্ভাব্য ঝুঁকি রয়েছে, তবুও প্রস্তাবিত অপ্টিমাইজেশন নির্দেশাবলীর মাধ্যমে কৌশলটির স্থিতিশীলতা এবং লাভজনকতা আরও উন্নত করা যেতে পারে। সামগ্রিকভাবে, এটি একটি ট্রেন্ড রিভার্সাল ট্রেডিং কৌশল যার স্পষ্ট যুক্তি এবং শক্তিশালী ব্যবহারিকতা রয়েছে।
/*backtest
start: 2024-12-19 00:00:00
end: 2024-12-26 00:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("RSI-Based Trading Strategy with No Trading Zone and ATR Stop Loss", overlay=true)
// Input parameters
rsiPeriod = input(14, title="RSI Period")
rsiOverbought = input(60, title="RSI Overbought Level")
rsiOversold = input(40, title="RSI Oversold Level")
rsiExitBuy = input(45, title="RSI Exit Buy Level")
rsiExitSell = input(55, title="RSI Exit Sell Level")
atrPeriod = input(14, title="ATR Period")
atrMultiplier = input(1.5, title="ATR Stop Loss Multiplier")
// Calculate RSI and ATR
rsi = ta.rsi(close, rsiPeriod)
atr = ta.atr(atrPeriod)
// Buy conditions
buyCondition = ta.crossover(rsi, rsiOverbought) and close > high[1]
if (buyCondition and not strategy.position_size)
stopLossLevel = close - atr * atrMultiplier
strategy.entry("Buy", strategy.long, stop=stopLossLevel)
// Exit conditions for buy
exitBuyCondition = rsi < rsiExitBuy
if (exitBuyCondition and strategy.position_size > 0)
strategy.close("Buy")
// Sell conditions
sellCondition = ta.crossunder(rsi, rsiOversold) and close < low[1]
if (sellCondition and not strategy.position_size)
stopLossLevel = close + atr * atrMultiplier
strategy.entry("Sell", strategy.short, stop=stopLossLevel)
// Exit conditions for sell
exitSellCondition = rsi > rsiExitSell
if (exitSellCondition and strategy.position_size < 0)
strategy.close("Sell")
// Plotting RSI for visualization
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
hline(rsiExitBuy, "Exit Buy", color=color.blue)
hline(rsiExitSell, "Exit Sell", color=color.orange)
plot(rsi, title="RSI", color=color.purple)
// // No Trading Zone
// var box noTradingZone = na
// // Create a rectangle for the no trading zone
// if (rsi >= rsiExitBuy and rsi <= rsiExitSell)
// // If the no trading zone box does not exist, create it
// if (na(noTradingZone))
// noTradingZone := box.new(bar_index, high, bar_index + 1, low, bgcolor=color.new(color.gray, 90), border_color=color.new(color.gray, 90))
// else
// // Update the existing box to cover the current candle
// box.set_left(noTradingZone, bar_index)
// box.set_right(noTradingZone, bar_index + 1)
// box.set_top(noTradingZone, high)
// box.set_bottom(noTradingZone, low)
// else
// // If the RSI is outside the no trading zone, delete the box
// if (not na(noTradingZone))
// box.delete(noTradingZone)
// noTradingZone := na