डबल मूविंग एवरेज मजबूत ट्रेडिंग रणनीति


निर्माण तिथि: 2024-02-05 10:57:28 अंत में संशोधित करें: 2024-02-05 10:57:28
कॉपी: 2 क्लिक्स: 615
1
ध्यान केंद्रित करना
1617
समर्थक

डबल मूविंग एवरेज मजबूत ट्रेडिंग रणनीति

अवलोकन

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

रणनीति सिद्धांत

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

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

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

श्रेष्ठता विश्लेषण

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

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

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

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

इस रणनीति का सबसे बड़ा जोखिम यह है कि RSI और ROC जैसे रिवर्स सिग्नल इंडिकेटरों में कुछ देरी होती है। जब रुझान बदलता है, तो इन संकेतकों में अक्सर कुछ देरी होती है, जिससे पैरामीटर सेट थ्रेशोल्ड स्तर तक पहुंच जाता है। इस देरी के कारण रणनीति का प्रवेश समय देर से होता है, जो रुझान के शुरुआती चरण को पकड़ने में असमर्थ होता है।

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

अनुकूलन दिशा

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

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