मजबूत दोहरी चलती औसत ट्रेडिंग रणनीति

लेखक:चाओझांग, दिनांकः 2024-02-05 10:57:28
टैगः

img

अवलोकन

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

रणनीति तर्क

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

इसके अलावा, रणनीति में किसी भी ट्रेड में प्रवेश करने से पहले मध्यम से दीर्घकालिक प्रवृत्ति फ़िल्टर (एसएमए) और अल्पकालिक स्टॉप लॉस लाइन शामिल हैं। यह सुनिश्चित करता है कि प्रविष्टियां केवल पुष्टि की गई प्रवृत्ति दिशा में और दोलन बाजारों में आसन्न स्टॉप लॉस जोखिमों के बिना होती हैं। इस तरह के विन्यास रेंज-बाउंड वातावरण में whipsawed होने की संभावना को कम करते हैं, जिससे ट्रेडरों के लिए रणनीति जोखिम-प्रबंधनीय हो जाती है।

लचीली इनपुट सेटिंग्स व्यापारियों को केवल आरएसआई, केवल आरओसी या दोनों के संयोजन के बीच चयन करने की अनुमति देती हैं। इससे विभिन्न उत्पादों और बाजार की स्थितियों में रणनीति की अनुकूलन क्षमता बढ़ जाती है।

लाभ विश्लेषण

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

एक अन्य लाभ अंतर्निहित प्रवृत्ति फ़िल्टर (एसएमए) और अल्पकालिक स्टॉप लॉस है, जो अस्थिर बाजारों में फंसने की संभावना को कम करते हैं। प्रवृत्ति निदान और अल्पकालिक स्टॉप लॉस के माध्यम से रक्षा की दो लाइनें इसे जोखिम-नियंत्रित मजबूत रणनीति बनाती हैं।

अंत में, कई पैरामीटर सेटिंग संयोजन व्यापारियों को विभिन्न उत्पादों और बाजार वातावरण के लिए रणनीति का अनुकूलन करने की अनुमति देते हैं। चाहे ट्रेंडिंग या रेंज-बाउंड बाजारों में, रणनीति पैरामीटर ट्यूनिंग के माध्यम से अनुकूलनशील हो सकती है।

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

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

एक अन्य संभावित जोखिम यह है कि अस्थिर बाजारों में, आरएसआई और आरओसी पैरामीटर सेटिंग्स बहुत संवेदनशील हो सकती हैं और कुछ झूठे संकेत उत्पन्न कर सकती हैं। यदि अल्पकालिक स्टॉप लॉस के साथ एक साथ ट्रिगर किया जाता है, तो ऐसे झूठे संकेत वास्तविक नुकसान का कारण बन सकते हैं।

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

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

  1. बाजार संरचना के बहुआयामी आकलन के साथ संकेत की सटीकता में सुधार के लिए केडीजे, एमएसीडी जैसे संयोजन उपयोग के लिए अधिक संकेतक शामिल करें

  2. आरएसआई और आरओसी मापदंडों में अनुकूलन अनुकूलन तंत्र पेश करें ताकि सेटिंग्स वास्तविक समय में अस्थिरता के आधार पर गतिशील रूप से समायोजित हो सकें

  3. प्रवृत्ति औजारों और उल्टा औजारों के साथ-साथ स्थितियों को पूरा करते समय पुष्टिकरण तंत्र जोड़कर प्रवेश तर्क को परिष्कृत करें, दोलन में झूठे संकेतों पर कार्य करने से बचें

  4. स्टॉप लॉस रेंज का विस्तार करें या स्टॉप लॉस क्लस्टरिंग के कारण खोए हुए मुनाफे को कम करते हुए रिवर्स को अधिक जगह प्रदान करने के लिए ट्रैलिंग स्टॉप लॉस सेट करें

निष्कर्ष

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


/*backtest
start: 2024-01-05 00:00:00
end: 2024-02-04 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/
// © GlobalMarketSignals

//@version=4
strategy("GMS: RSI & ROC Strategy", overlay=true)

LongShort = input(title="Long Only or Short Only or Both?", type=input.string, defval="Both", options=["Both", "Long Only", "Short Only"])
RSIroc = input(title="RSI Only, ROC Only, Both?", type=input.string, defval="Both", options=["Both", "RSI Only", "ROC Only"])
RSILength = input(title="RSI Length", type = input.integer ,defval=14)
RSIUpper = input(title="RSI Upper Threshold", type = input.float ,defval=70)
RSILower = input(title="RSI Lower Threshold", type = input.float ,defval=30)
ROCLength = input(title="ROC Length", type = input.integer ,defval=14)
ROCUpper = input(title="ROC Upper Threshold", type = input.float ,defval=0.01)
ROCLower = input(title="ROC Lower Threshold", type = input.float ,defval=-0.01)
LongExit = input(title="Long Exit SMA Length", type = input.integer ,defval=5)
ShortExit = input(title="Short Exit SMA Length", type = input.integer ,defval=5)
AboveBelow = input(title="Trend SMA Filter?", type=input.string, defval="Above", options=["Above", "Below", "Don't Include"])
TrendLength = input(title="Trend SMA Length", type = input.integer ,defval=200)

//RSI ONLY
 //Long Side

if LongShort =="Long Only" and AboveBelow == "Above" and RSIroc == "RSI Only"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit) and close>sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Long Only" and AboveBelow == "Below" and RSIroc == "RSI Only"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit) and close<sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Long Only" and AboveBelow == "Don't Include" and RSIroc == "RSI Only"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "RSI Only"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit) and close>sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "RSI Only"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit) and close<sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "RSI Only"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
//RSI ONLY
 //SHORT SIDE

if LongShort =="Short Only" and AboveBelow == "Above" and RSIroc == "RSI Only"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Short Only" and AboveBelow == "Below" and RSIroc == "RSI Only"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Short Only" and AboveBelow == "Don't Include" and RSIroc == "RSI Only"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "RSI Only"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "RSI Only"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "RSI Only"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
///////-----------------/////////////
///////-----------------/////////////
///////-----------------/////////////
    
    
//ROC ONLY
 //Long Side

if LongShort =="Long Only" and AboveBelow == "Above" and RSIroc == "ROC Only"
    strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close>sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Long Only" and AboveBelow == "Below" and RSIroc == "ROC Only"
    strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close<sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Long Only" and AboveBelow == "Don't Include" and RSIroc == "ROC Only"
    strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "ROC Only"
    strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close>sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "ROC Only"
    strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close<sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "ROC Only"
    strategy.entry("LONG", true, when = rsi(close,ROCLength)<ROCLower and close< sma(close,LongExit))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
//ROC ONLY
 //SHORT SIDE

if LongShort =="Short Only" and AboveBelow == "Above" and RSIroc == "ROC Only"
    strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Short Only" and AboveBelow == "Below" and RSIroc == "ROC Only"
    strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Short Only" and AboveBelow == "Don't Include" and RSIroc == "ROC Only"
    strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "ROC Only"
    strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "ROC Only"
    strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "ROC Only"
    strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
   
    
///////-----------------/////////////
///////-----------------/////////////
///////-----------------/////////////   

    
//BOTH
 //Long Side

if LongShort =="Long Only" and AboveBelow == "Above" and RSIroc == "Both"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close>sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Long Only" and AboveBelow == "Below" and RSIroc == "Both"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close<sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Long Only" and AboveBelow == "Don't Include" and RSIroc == "Both"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower  and close< sma(close,LongExit))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "Both"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower  and close< sma(close,LongExit) and close>sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "Both"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower  and close< sma(close,LongExit) and close<sma(close,TrendLength))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "Both"
    strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower  and close< sma(close,LongExit))
    strategy.close("LONG", when = close>sma(close,LongExit))
    
//BOTH
 //SHORT SIDE

if LongShort =="Short Only" and AboveBelow == "Above" and RSIroc == "Both"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Short Only" and AboveBelow == "Below" and RSIroc == "Both"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Short Only" and AboveBelow == "Don't Include" and RSIroc == "Both"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "Both"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "Both"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "Both"
    strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit))
    strategy.close("SHORT", when = close<sma(close,ShortExit))
    
    

अधिक