
یہ حکمت عملی ایک مقداری تجارتی نظام ہے جس کی بنیاد موونگ ایوریج کراس اوور اور RSI انڈیکیٹرز پر ہے، جو بنیادی طور پر آپشنز مارکیٹ میں ٹریڈنگ کے لیے استعمال ہوتی ہے۔ یہ حکمت عملی تیز رفتار اور سست حرکت اوسط کے کراس اوور سگنلز کا استعمال کرتی ہے، RSI اووربوٹ اور اوور سیلڈ لیولز کے ساتھ مل کر لین دین کے وقت کا تعین کرتی ہے، جبکہ خطرات کو کنٹرول کرنے کے لیے ٹیک پرافٹ اور اسٹاپ لاس سیٹ کرتی ہے۔ یہ حکمت عملی 5 منٹ کے ٹائم فریم پر ٹریڈنگ کے لیے موزوں ہے۔
حکمت عملی میں دو اہم تکنیکی اشارے استعمال کیے گئے ہیں: موونگ ایوریج (MA) اور رشتہ دار طاقت انڈیکس (RSI)۔ خاص طور پر:
یہ حکمت عملی متحرک اوسط کراس اوور اور RSI اشارے کو ملا کر ایک نسبتاً مکمل تجارتی نظام تشکیل دیتی ہے۔ حکمت عملی کے فوائد ایک سے زیادہ سگنل کی تصدیق اور کامل رسک مینجمنٹ میں ہیں، لیکن حکمت عملی کی کارکردگی پر مارکیٹ کے ماحول کے اثرات پر بھی توجہ دینا ضروری ہے۔ مسلسل اصلاح اور بہتری کے ذریعے، اس حکمت عملی سے آپشنز مارکیٹ میں مستحکم کارکردگی حاصل کرنے کی امید ہے۔ یہ سفارش کی جاتی ہے کہ تاجر حقیقی وقت کے استعمال سے پہلے کافی بیک ٹیسٹنگ اور پیرامیٹر کی اصلاح کریں۔
/*backtest
start: 2024-12-06 00:00:00
end: 2025-01-04 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("MA Crossover with RSI Debugging", overlay=true)
// Inputs
fastLength = input.int(7, title="Fast MA Length", minval=1)
slowLength = input.int(13, title="Slow MA Length", minval=1)
rsiLength = input.int(17, title="RSI Length", minval=1)
rsiOverbought = input.int(64, title="RSI Overbought Level", minval=50, maxval=100)
rsiOversold = input.int(43, title="RSI Oversold Level", minval=0, maxval=50)
takeProfitPerc = input.float(4, title="Take Profit (%)", minval=0.1)
stopLossPerc = input.float(0.5, title="Stop Loss (%)", minval=0.1)
// Moving Averages
fastMA = ta.sma(close, fastLength)
slowMA = ta.sma(close, slowLength)
// RSI
rsi = ta.rsi(close, rsiLength)
// Entry Conditions
longCondition = ta.crossover(fastMA, slowMA) and rsi < rsiOversold
shortCondition = ta.crossunder(fastMA, slowMA) and rsi > rsiOverbought
// Plot Debugging Shapes
plotshape(ta.crossover(fastMA, slowMA), color=color.green, style=shape.circle, location=location.belowbar, title="Fast MA Crossover")
plotshape(ta.crossunder(fastMA, slowMA), color=color.red, style=shape.circle, location=location.abovebar, title="Fast MA Crossunder")
plotshape(rsi < rsiOversold, color=color.blue, style=shape.triangleup, location=location.belowbar, title="RSI Oversold")
plotshape(rsi > rsiOverbought, color=color.orange, style=shape.triangledown, location=location.abovebar, title="RSI Overbought")
// Entry and Exit Execution
if (longCondition)
strategy.entry("Buy", strategy.long)
if (shortCondition)
strategy.entry("Sell", strategy.short)
takeProfitPrice = strategy.position_avg_price * (1 + takeProfitPerc / 100)
stopLossPrice = strategy.position_avg_price * (1 - stopLossPerc / 100)
if (strategy.position_size > 0)
strategy.exit("Exit Buy", from_entry="Buy", limit=takeProfitPrice, stop=stopLossPrice)
if (strategy.position_size < 0)
strategy.exit("Exit Sell", from_entry="Sell", limit=takeProfitPrice, stop=stopLossPrice)
// Plot Moving Averages
plot(fastMA, color=color.blue, title="Fast MA")
plot(slowMA, color=color.red, title="Slow MA")
// RSI Levels
hline(rsiOverbought, "RSI Overbought", color=color.red)
hline(rsiOversold, "RSI Oversold", color=color.green)