یہ حکمت عملی ایک ٹرینڈ ریورسل ٹریڈنگ سسٹم ہے جس کی بنیاد رشتہ دار طاقت انڈیکس (RSI) پر ہوتی ہے یہ زیادہ خریدی ہوئی اور زیادہ فروخت شدہ رینجز کو ترتیب دے کر مارکیٹ کے ٹرننگ پوائنٹس کو حاصل کرتی ہے، اور رسک کنٹرول کے لیے ATR ڈائنامک سٹاپ نقصان کو یکجا کرتی ہے۔ حکمت عملی کی انفرادیت “ممنوعہ تجارتی رینج” کے تصور کو متعارف کرانے میں مضمر ہے، جو مؤثر طریقے سے غیر مستحکم مارکیٹ میں بار بار تجارت سے گریز کرتی ہے۔ یہ حکمت عملی زیادہ اتار چڑھاؤ کے ساتھ مارکیٹ کے ماحول کے لیے موزوں ہے، خاص طور پر واضح رجحان کی خصوصیات کے ساتھ تجارتی مصنوعات کے لیے۔
حکمت عملی بنیادی طور پر درج ذیل بنیادی منطق کی بنیاد پر نافذ کی جاتی ہے:
یہ حکمت عملی RSI ریورسل سگنلز اور ممنوعہ ٹریڈنگ رینجز کے جدید امتزاج کے ذریعے ٹرینڈ ٹریڈنگ میں وقت کا مسئلہ حل کرتی ہے۔ اے ٹی آر ڈائنامک سٹاپ نقصان کا تعارف حکمت عملی کے لیے ایک قابل اعتماد رسک کنٹرول میکانزم فراہم کرتا ہے۔ اگرچہ حکمت عملی میں ابھی بھی کچھ ممکنہ خطرات موجود ہیں، لیکن تجویز کردہ اصلاحی ہدایات کے ذریعے حکمت عملی کے استحکام اور منافع کو مزید بہتر بنایا جا سکتا ہے۔ مجموعی طور پر، یہ واضح منطق اور مضبوط عملییت کے ساتھ ایک رجحان کو تبدیل کرنے والی تجارتی حکمت عملی ہے۔
/*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