
यह रणनीति अपेक्षाकृत मजबूत सूचकांक (आरएसआई) सूचक डिजाइन पर आधारित है, जो आरएसआई सूचक के ओवरबॉय ओवरसोल सिद्धांत का उपयोग करके द्वि-दिशात्मक ब्रेकआउट ऑपरेशन करता है। आरएसआई सूचक पर सेट ओवरबॉय लाइन को पार करते समय अधिक करें, और आरएसआई सूचक के नीचे सेट ओवरसोल लाइन को पार करते समय शून्य करें, जो एक विशिष्ट रिवर्स ट्रेडिंग रणनीति है।
आरएसआई सूचक के लिए पैरामीटर की गणना उपयोगकर्ता के इनपुट सेटिंग्स के आधार पर की जाती है, जिसमें आरएसआई चक्र की लंबाई, ओवरबॉट थ्रेशोल्ड और ओवरबॉट थ्रेशोल्ड शामिल हैं।
आरएसआई वक्र के संबंध में ओवरबॉय लाइन और ओवरबॉल्ड लाइन के स्थान के संबंध में, यह निर्धारित करने के लिए कि क्या यह ओवरबॉय या ओवरबॉल्ड क्षेत्र है।
जब आरएसआई संकेतक ओवरसोल्ड क्षेत्र से तोड़ने के लिए मूल्यह्रास लाइन के अनुरूप है, तो विपरीत दिशा में स्थिति खोलने का संचालन करें। उदाहरण के लिए, ओवरसोल्ड क्षेत्र से ओवरसोल्ड लाइन को तोड़ने के लिए, यह माना जाता है कि बाजार में बदलाव आया है, इस समय अधिक स्थिति खोलें; ओवरसोल्ड क्षेत्र से ओवरसोल्ड लाइन को तोड़ने के लिए, यह माना जाता है कि बाजार में बदलाव आया है, इस समय स्थिति खोलें।
स्थिति खोलने के बाद, स्टॉप लॉस स्टॉप लाइन सेट करें। स्टॉप लॉस स्टॉप स्थिति को ट्रैक करें, और शर्तों को पूरा करने पर स्थिति को बंद करें।
यह रणनीति ईएमए को फ़िल्टर के रूप में उपयोग करने की वैकल्पिक सुविधा भी प्रदान करती है। केवल आरएसआई संकेतक के साथ-साथ ईएमए को तोड़ने के लिए एक स्थिति खोलने के लिए।
रणनीति भी केवल एक विशिष्ट व्यापार समय पर व्यापार करने के लिए सुविधा प्रदान करता है. उपयोगकर्ता केवल एक निश्चित समय पर व्यापार करने के लिए सेट कर सकते हैं, और समय के बाद बाहर निकलें.
जोखिम समाधान:
इस रणनीति को निम्नलिखित पहलुओं से अनुकूलित किया जा सकता हैः
आरएसआई पैरामीटर का अनुकूलन करें, विभिन्न किस्मों के लिए सर्वोत्तम पैरामीटर संयोजन की तलाश करें। सबसे अच्छा ओवरबॉट ओवरसोल्ड थ्रेशोल्ड को ट्रांसेक्शनल रीट्रेसिंग द्वारा पाया जा सकता है।
विभिन्न संकेतकों को एक मजबूत निर्णय संकेत के लिए आरएसआई के साथ संयोजन या संयोजन करने का प्रयास करें, जैसे कि एमएसीडी, केडी, ब्लिंक बैंड, आदि।
स्टॉप लॉस स्टॉप रणनीति को अनुकूलित करें, रणनीति की स्थिरता में सुधार करें। बाजार में उतार-चढ़ाव के आधार पर स्टॉप लॉस सेट किया जा सकता है, या स्टॉप लॉस ट्रैकिंग फ़ंक्शन के साथ रणनीति।
ईएमए फ़िल्टर पैरामीटर को अनुकूलित करें या अन्य सूचक फ़िल्टर का परीक्षण करें, और अधिक से बचें।
प्रवृत्ति का आकलन करने के लिए मॉड्यूल जोड़ें, और बहु-हेड ट्रेडों को उल्टा करने से बचें, या बहु-हेड ट्रेडों को उल्टा करें।
विभिन्न ट्रेडिंग समय पैरामीटरों का परीक्षण करें कि कौन से समय रणनीति के लिए उपयुक्त हैं और कौन से समय से बचना चाहिए।
आरएसआई द्वि-दिशात्मक तोड़ने की रणनीति समग्र विचार स्पष्ट है, क्लासिक आरएसआई ओवरबॉय ओवरसोल सिद्धांत का उपयोग करके रिवर्स ट्रेडिंग। ओवरबॉय ओवरसोल क्षेत्र के रिवर्स अवसरों को पकड़ने के लिए, ईएमए फ़िल्टर और स्टॉपलॉस स्टॉप के माध्यम से जोखिम को नियंत्रित करने के लिए। पैरामीटर अनुकूलन और मॉड्यूल अनुकूलन के माध्यम से अधिक जगह है, इसे अधिक स्थिर और विश्वसनीय रिवर्स रणनीति के रूप में बनाया जा सकता है। आगे परीक्षण और अनुकूलन के बाद व्यावहारिक अनुप्रयोग के लायक है।
/*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)