आरएसआई रिवर्सल ब्रेकआउट रणनीति

लेखक:चाओझांग, दिनांक: 2023-11-08 12:11:03
टैगः

img

अवलोकन

यह रणनीति रिलेटिव स्ट्रेंथ इंडेक्स (आरएसआई) संकेतक पर आधारित है और ब्रेकआउट ट्रेड करने के लिए आरएसआई के ओवरबॉट/ओवरसोल्ड सिद्धांतों का उपयोग करती है। यह तब लंबा हो जाता है जब आरएसआई ओवरबॉट सीमा से ऊपर टूट जाता है और जब आरएसआई ओवरसोल्ड सीमा से नीचे टूट जाता है तो छोटा हो जाता है। यह एक विशिष्ट औसत रिवर्सन ट्रेडिंग रणनीति है।

रणनीति तर्क

  1. आरएसआई संकेतकों के मापदंडों को उपयोगकर्ता के इनपुट के आधार पर सेट करें, जिसमें आरएसआई अवधि, ओवरबॉट थ्रेशोल्ड और ओवरसोल्ड थ्रेशोल्ड शामिल हैं।

  2. निर्धारित करें कि क्या आरएसआई सीमाओं के सापेक्ष अपनी स्थिति के आधार पर ओवरबॉट या ओवरसोल्ड क्षेत्र में है।

  3. जब आरएसआई ओवरबॉट/ओवरसोल्ड जोन से बाहर निकलता है और संबंधित थ्रेशोल्ड लाइन को पार करता है, तो विपरीत दिशा में ट्रेड करें। उदाहरण के लिए, जब आरएसआई ओवरबॉट जोन से ओवरबॉट लाइन से ऊपर टूटता है, तो बाजार को उलट माना जाता है, इस बिंदु पर लंबा हो जाता है। जब आरएसआई ओवरसोल्ड जोन से ओवरसोल्ड लाइन से नीचे टूटता है, तो बाजार को उल्टा माना जाता है, यहां छोटा हो जाता है।

  4. प्रवेश करने के बाद, स्टॉप लॉस सेट करें और लाभ लाइनें लें। ट्रिगर होने पर SL/TP ट्रैक करें और बंद करें।

  5. रणनीति ईएमए को फ़िल्टर के रूप में उपयोग करने का विकल्प भी प्रदान करती है। केवल तभी ट्रेड सिग्नल लें जब आरएसआई सिग्नल और ईएमए दिशा के खिलाफ मूल्य ब्रेकआउट दोनों मिलें।

  6. यह केवल विशिष्ट समय सीमा के भीतर ही व्यापार करने की अनुमति देता है। समय सीमा के अंत में पद बंद हो जाएंगे।

लाभ विश्लेषण

  • अच्छा बैकटेस्ट परिणामों के साथ क्लासिक आरएसआई ब्रेकआउट सिद्धांतों का उपयोग करता है।

  • विभिन्न उत्पादों के लिए उपयुक्त लचीली ओवरबॉट/ओवरसोल्ड थ्रेशोल्ड सेटिंग।

  • वैकल्पिक ईएमए फ़िल्टर अत्यधिक व्हीपसा व्यापार से बचाता है।

  • स्थिरता बढ़ाने के लिए SL/TP का समर्थन करता है।

  • अनुचित अवधि से बचने के लिए समय फ्रेम फ़िल्टर का समर्थन करता है.

  • दो तरफ़ा मूल्य उतार-चढ़ाव का पूर्ण उपयोग करने के लिए लंबी और छोटी दोनों का समर्थन करता है।

जोखिम विश्लेषण

  • आरएसआई विचलन अक्सर होता है, केवल आरएसआई पर भरोसा करने से गलत संकेत उत्पन्न हो सकते हैं। प्रवृत्ति, चलती औसत आदि के साथ संयोजन की आवश्यकता होती है।

  • गलत सीमा सेटिंग्स से बहुत अधिक या अनुपलब्ध ट्रेड होते हैं।

  • खराब SL/TP सेटिंग्स अति-आक्रामकता या अति-संरक्षकता का कारण बनती हैं।

  • गलत ईएमए फ़िल्टर सेटिंग्स वैध ट्रेडों को मिस कर सकती हैं या अच्छे संकेतों को फ़िल्टर कर सकती हैं।

जोखिम समाधान:

  • विभिन्न उत्पादों के लिए आरएसआई मापदंडों का अनुकूलन करें।

  • विचलन की पहचान करने के लिए प्रवृत्ति संकेतकों के साथ संयोजन करें।

  • SL/TP मापदंडों का परीक्षण और अनुकूलन करें।

  • ईएमए मापदंडों का परीक्षण और अनुकूलन करें।

अनुकूलन दिशाएँ

इस रणनीति में निम्नलिखित पहलुओं में सुधार किया जा सकता हैः

  1. आरएसआई मापदंडों को अनुकूलित करें ताकि विभिन्न उत्पादों के लिए सर्वोत्तम सेटिंग्स को पूर्ण बैकटेस्ट के माध्यम से पाया जा सके।

  2. अधिक मजबूत संकेत उत्पन्न करने के लिए आरएसआई के साथ संयुक्त या प्रतिस्थापित विभिन्न संकेतकों का प्रयास करें, जैसे एमएसीडी, केडी, बोलिंगर बैंड आदि।

  3. स्थिरता बढ़ाने के लिए स्टॉप लॉस को अनुकूलित करें और लाभ रणनीतियाँ अपनाएं। अनुकूलन स्टॉप या ट्रेलिंग स्टॉप का उपयोग किया जा सकता है।

  4. ईएमए फिल्टर मापदंडों को अनुकूलित करें या अन्य फिल्टरों के साथ प्रयोग करें ताकि बेहतर तरीके से whipsaws से बचा जा सके।

  5. प्राथमिक प्रवृत्ति के विरुद्ध व्यापार करने से बचने के लिए प्रवृत्ति फ़िल्टर मॉड्यूल जोड़ें।

  6. इस रणनीति के लिए सर्वोत्तम ट्रेडिंग सत्र खोजने के लिए विभिन्न समय सीमाओं का परीक्षण करें।

सारांश

आरएसआई रिवर्सल ब्रेकआउट रणनीति में क्लासिक ओवरबॉट / ओवरसोल्ड सिद्धांतों के आधार पर स्पष्ट तर्क है। इसका उद्देश्य उचित जोखिम नियंत्रण फ़िल्टर के साथ चरम पर औसत प्रतिगमन को पकड़ना है। पैरामीटर ट्यूनिंग और मॉड्यूलर सुधारों के माध्यम से इसे एक स्थिर रणनीति में बदलने की अच्छी क्षमता है। यह अनुकूलित करने और लाइव ट्रेडिंग में लागू करने के लायक है।


/*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)
    



अधिक