
یہ حکمت عملی نسبتا strong مضبوط انڈیکس (RSI) اشارے کے ڈیزائن پر مبنی ہے ، جس میں RSI اشارے کے اوپری خرید اوپری فروخت اصول کا استعمال کرتے ہوئے دو طرفہ توڑنے کا آپریشن کیا گیا ہے۔ جب RSI اشارے پر مقررہ اوپری خرید لائن کو عبور کرتے ہو تو زیادہ کریں ، اور جب RSI اشارے کے نیچے مقررہ اوپری فروخت لائن کو عبور کرتے ہو تو خالی ہوجائیں ، یہ ایک عام الٹ ٹریڈنگ حکمت عملی ہے۔
RSI اشارے کے پیرامیٹرز کا حساب صارف کے ان پٹ کی ترتیبات کے مطابق کیا جاتا ہے ، بشمول RSI سائیکل کی لمبائی ، حد سے زیادہ خریدنے کی حد ، حد سے زیادہ فروخت کی حد۔
RSI منحنی خطوط کے سلسلے میں اوپری خرید لائن اور اوپری فروخت لائن کے مقام کے تعلقات کی بنیاد پر ، یہ فیصلہ کیا جاتا ہے کہ آیا یہ اوپری خرید زون ہے یا اوپری فروخت زون۔
جب آر ایس آئی اشارے اوور سیل زون سے ٹوٹنے کے لئے معاوضہ کی لائن کو توڑتا ہے تو ، مخالف سمت میں پوزیشن کھولنے کی کارروائی کی جاتی ہے۔ مثال کے طور پر ، اوور سیل زون سے اوور سیل لائن کو توڑنے کے بعد ، یہ سمجھا جاتا ہے کہ اس کی واپسی ہوئی ہے ، اس وقت زیادہ پوزیشن کھولی گئی ہے۔ جب اوور سیل زون سے اوور سیل لائن کو توڑنے کے بعد ، یہ سمجھا جاتا ہے کہ اس کی واپسی ہوئی ہے ، اس وقت خالی پوزیشن کھولی گئی ہے۔
پوزیشن کھولنے کے بعد ، اسٹاپ نقصان کی روک تھام کی لائن ترتیب دیں۔ اسٹاپ نقصان کی روک تھام کی صورتحال کو ٹریک کریں ، اور جب شرطیں پوری ہوں تو پوزیشن کو صاف کریں۔
اس حکمت عملی میں ای ایم اے کو بطور فلٹر استعمال کرنے کی ایک اختیاری خصوصیت بھی پیش کی گئی ہے۔ صرف اس صورت میں جب آر ایس آئی اشارے میں زیادہ سے زیادہ کاٹنے کا اشارہ کیا گیا ہو ، قیمتوں کو ای ایم اے کو توڑنے کے لئے پوزیشن کھولنے کی ضرورت ہوگی۔
حکمت عملی صرف مخصوص ٹرانزیکشن کے وقت تجارت کرنے کی خصوصیت بھی پیش کرتی ہے۔ صارف صرف ایک خاص وقت کے دوران تجارت کرنے کے لئے مقرر کرسکتا ہے ، اور وقت سے زیادہ کے بعد پوزیشن سے باہر نکل سکتا ہے۔
خطرے کا حل:
اس حکمت عملی کو مندرجہ ذیل پہلوؤں سے بہتر بنایا جاسکتا ہے:
آر ایس آئی پیرامیٹرز کو بہتر بنائیں ، مختلف اقسام کے بہترین پیرامیٹرز کا مجموعہ تلاش کریں۔ بہترین اوورلوڈ اوور سیلنگ گھاٹیوں کو تلاش کرنے کے لئے ٹرانسمیشن کی جانچ پڑتال کی جاسکتی ہے۔
مختلف اشارے کو متبادل بنانے یا ان کے ساتھ مل کر آر ایس آئی بنانے کی کوشش کریں تاکہ فیصلہ کن سگنل پیدا ہوسکے۔ جیسے ایم اے سی ڈی ، کے ڈی ، برن بینڈ وغیرہ۔
اسٹاپ اسٹاپ حکمت عملی کو بہتر بنائیں ، حکمت عملی کی استحکام کو بہتر بنائیں۔ آپ مارکیٹ میں اتار چڑھاؤ کی بنیاد پر اسٹاپ اسٹاپ سیٹ کرسکتے ہیں ، یا ٹریکنگ اسٹاپ فنکشن والی حکمت عملیوں کے ساتھ۔
ای ایم اے فلٹر پیرامیٹرز کو بہتر بنائیں یا دوسرے اشارے کے فلٹرز کو آزمائیں ، اور اس سے بچنے سے بچیں۔
رجحانات کا تعین کرنے کے لئے ماڈیولز شامل کریں ، اور کثیر جہتی تجارت کو الٹا کرنے یا کثیر جہتی تجارت کو الٹا کرنے سے گریز کریں۔
مختلف تجارتی اوقات کے پیرامیٹرز کی جانچ کریں تاکہ یہ معلوم کیا جاسکے کہ کون سے اوقات اس حکمت عملی کے لئے موزوں ہیں اور کون سے اوقات سے گریز کیا جانا چاہئے۔
آر ایس آئی دو طرفہ توڑنے کی حکمت عملی کا مجموعی نظریہ واضح ہے ، کلاسیکی آر ایس آئی اووربائ اوور سیل اصول کا استعمال کرتے ہوئے واپسی کی تجارت کریں۔ آپ اووربائ اوور سیل زون میں واپسی کے مواقع سے فائدہ اٹھاسکتے ہیں ، لیکن ای ایم اے فلٹرنگ اور اسٹاپ نقصان کو روکنے کے ذریعے خطرے کو کنٹرول کرسکتے ہیں۔ پیرامیٹرز کی اصلاح اور ماڈیول کی اصلاح کے ذریعہ ، اس میں زیادہ جگہ ہے ، جس سے یہ مستحکم اور قابل اعتماد واپسی کی حکمت عملی بن سکتی ہے۔
/*backtest
start: 2023-10-08 00:00:00
end: 2023-11-07 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © REV0LUTI0N
//@version=4
strategy("RSI Strategy", overlay=true, initial_capital = 10000, default_qty_value = 10000, default_qty_type = strategy.cash)
// Strategy Backtesting
startDate = input(timestamp("2021-10-01T00:00:00"), type = input.time, title='Backtesting Start Date')
finishDate = input(timestamp("9999-12-31T00:00:00"), type = input.time, title='Backtesting End Date')
time_cond = true
// Strategy
Length = input(12, minval=1)
src = input(close, title="Source")
overbought = input(70, minval=1)
oversold = input(30, minval=1)
xRSI = rsi(src, Length)
rsinormal = input(true, title="Overbought Go Long & Oversold Go Short")
rsiflipped = input(false, title="Overbought Go Short & Oversold Go Long")
// EMA Filter
noemafilter = input(true, title="No EMA Filter")
useemafilter = input(false, title="Use EMA Filter")
ema_length = input(defval=15, minval=1, title="EMA Length")
emasrc = input(close, title="Source")
ema = ema(emasrc, ema_length)
plot(ema, "EMA", style=plot.style_linebr, color=#cad850, linewidth=2)
//Time Restriction Settings
startendtime = input("", title='Time Frame To Enter Trades')
enableclose = input(false, title='Enable Close Trade At End Of Time Frame')
timetobuy = (time(timeframe.period, startendtime))
timetoclose = na(time(timeframe.period, startendtime))
// Stop Loss & Take Profit % Based
enablesl = input(false, title='Enable Stop Loss')
enabletp = input(false, title='Enable Take Profit')
stopTick = input(5.0, title='Stop Loss %', type=input.float, step=0.1) / 100
takeTick = input(10.0, title='Take Profit %', type=input.float, step=0.1) / 100
longStop = strategy.position_avg_price * (1 - stopTick)
shortStop = strategy.position_avg_price * (1 + stopTick)
shortTake = strategy.position_avg_price * (1 - takeTick)
longTake = strategy.position_avg_price * (1 + takeTick)
plot(strategy.position_size > 0 and enablesl ? longStop : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Long Fixed SL")
plot(strategy.position_size < 0 and enablesl ? shortStop : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Short Fixed SL")
plot(strategy.position_size > 0 and enabletp ? longTake : na, style=plot.style_linebr, color=color.green, linewidth=1, title="Long Take Profit")
plot(strategy.position_size < 0 and enabletp ? shortTake : na, style=plot.style_linebr, color=color.green, linewidth=1, title="Short Take Profit")
// Alert messages
message_enterlong = input("", title="Long Entry message")
message_entershort = input("", title="Short Entry message")
message_closelong = input("", title="Close Long message")
message_closeshort = input("", title="Close Short message")
// Strategy Execution
if (xRSI > overbought and close > ema and time_cond and timetobuy and rsinormal and useemafilter)
strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (xRSI < oversold and close < ema and time_cond and timetobuy and rsinormal and useemafilter)
strategy.entry("Short", strategy.short, alert_message = message_entershort)
if (xRSI < oversold and close > ema and time_cond and timetobuy and rsiflipped and useemafilter)
strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (xRSI > overbought and close < ema and time_cond and timetobuy and rsiflipped and useemafilter)
strategy.entry("Short", strategy.short, alert_message = message_entershort)
if (xRSI > overbought and time_cond and timetobuy and rsinormal and noemafilter)
strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (xRSI < oversold and time_cond and timetobuy and rsinormal and noemafilter)
strategy.entry("Short", strategy.short, alert_message = message_entershort)
if (xRSI < oversold and time_cond and timetobuy and rsiflipped and noemafilter)
strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (xRSI > overbought and time_cond and timetobuy and rsiflipped and noemafilter)
strategy.entry("Short", strategy.short, alert_message = message_entershort)
if strategy.position_size > 0 and timetoclose and enableclose
strategy.close_all(alert_message = message_closelong)
if strategy.position_size < 0 and timetoclose and enableclose
strategy.close_all(alert_message = message_closeshort)
if strategy.position_size > 0 and enablesl and time_cond
strategy.exit(id="Close Long", stop=longStop, limit=longTake, alert_message = message_closelong)
if strategy.position_size < 0 and enablesl and time_cond
strategy.exit(id="Close Short", stop=shortStop, limit=shortTake, alert_message = message_closeshort)
if strategy.position_size > 0 and enabletp and time_cond
strategy.exit(id="Close Long", stop=longStop, limit=longTake, alert_message = message_closelong)
if strategy.position_size < 0 and enabletp and time_cond
strategy.exit(id="Close Short", stop=shortStop, limit=shortTake, alert_message = message_closeshort)