ट्रेंड फॉलोइंग मीन रिवर्सन चैनल रणनीति


निर्माण तिथि: 2023-11-01 16:20:45 अंत में संशोधित करें: 2023-11-01 16:20:45
कॉपी: 0 क्लिक्स: 747
1
ध्यान केंद्रित करना
1617
समर्थक

ट्रेंड फॉलोइंग मीन रिवर्सन चैनल रणनीति

अवलोकन

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

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

  1. बाजार के रुझान को निर्धारित करने के लिए CCI सूचकांक के 0-अक्ष क्रॉस का उपयोग करें, CCI 0-अक्ष को ऊपर से पार करना एक bullish संकेत है, CCI 0-अक्ष को नीचे से पार करना एक bearish संकेत है।

  2. एक कस्टम CCI ऊपर और नीचे चैनल बैंड के माध्यम से, जब CCI ऊपर चैनल बैंड के माध्यम से एक bullish संकेत है, तो CCI नीचे चैनल बैंड के माध्यम से एक bearish संकेत है। चैनल बैंड क्रॉसिंग एक स्टॉप लॉस सिग्नल है।

  3. केवल एक निश्चित समय अवधि के लिए ट्रेडों को सेट करें, एक निश्चित समय अवधि के लिए ट्रेडों को सेट करें।

  4. एक निश्चित स्टॉप लॉस और स्टॉप बस्ट अनुपात सेट करें।

  5. अनुकूलित ट्रेडों के लिए Alert संदेश

  6. रणनीति पूरी तरह से अनुकूलन योग्य है, CCI पैरामीटर, मार्ग बैंड पैरामीटर, स्टॉप लॉस स्टॉप पैरामीटर और अन्य अनुकूलन रणनीतियों को समायोजित करने के लिए।

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

  1. बाजार के रुझानों का आकलन करने के लिए CCI का उपयोग किया जाता है, CCI मूल्य परिवर्तनों के प्रति संवेदनशील है और बाजार के मोड़ को जल्दी से पकड़ सकता है।

  2. कस्टम चैनल बैंड विभिन्न बाजारों के अनुसार पैरामीटर को समायोजित कर सकता है, चैनल बैंड क्रॉस स्टॉप लॉस जोखिम को प्रभावी ढंग से नियंत्रित कर सकता है।

  3. विभिन्न ट्रेडिंग समय सेटिंग्स का समर्थन करें, विभिन्न समय अवधि के अनुसार रणनीति पैरामीटर को समायोजित करें, विभिन्न समय अवधि की विशेषताओं का उपयोग करके अतिरिक्त लाभ प्राप्त करें।

  4. फिक्स्ड स्टॉप-लॉस स्टॉप सेटिंग्स का समर्थन करें, लाभ-हानि अनुपात को पूर्व निर्धारित करें, और व्यक्तिगत ट्रेडों के जोखिम को प्रभावी ढंग से नियंत्रित करें।

  5. पूरी तरह से अनुकूलन योग्य पैरामीटर, विभिन्न किस्मों और बाजार स्थितियों के लिए रणनीति अनुकूलन, बेहतर परिणाम प्राप्त करने के लिए।

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

  1. सीसीआई सूचक मूल्य परिवर्तन के प्रति संवेदनशील है और कुछ झूठे संकेत उत्पन्न कर सकता है, जिसे लंबे समय तक चलने वाले सूचकांकों के साथ सत्यापित किया जाना चाहिए।

  2. फिक्स्ड स्टॉप लॉस स्टॉप अनुपात को बाजार में बदलाव के अनुसार समायोजित नहीं किया जा सकता है, अनुपात को उचित रूप से संरक्षित किया जाना चाहिए।

  3. फिक्स्ड ट्रेडिंग समय में बाजार के शॉर्ट-लाइन समायोजन के अवसरों को याद किया जा सकता है, उचित रूप से ट्रेडिंग मूल्य के लिए समय अवधि का चयन किया जाना चाहिए।

  4. पैरामीटर को अक्सर अनुकूलित करने की आवश्यकता होती है, यदि अनुकूलन गलत है तो यह ओवर-ट्रेडिंग या व्यापार के अवसरों को याद कर सकता है।

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

अनुकूलन दिशा

  1. CCI को गलत संकेतों से बचाने के लिए दीर्घकालिक और लघुकालिक संकेतकों के साथ सत्यापन करें।

  2. गतिशील स्टॉप-लॉस स्टॉप को एटीआर जैसे संकेतकों का उपयोग करके सेट करें।

  3. विभिन्न समय अवधि के लिए मापदंडों के प्रभाव का परीक्षण करें और व्यापार के लिए सबसे प्रभावी समय चुनें।

  4. CCI पैरामीटर, चैनल बैंड पैरामीटर को अनुकूलित करें, बाजार में बदलाव के लिए अनुकूलित करें।

  5. प्रवृत्ति, उतार-चढ़ाव, लेन-देन की मात्रा आदि जैसे कई कारकों को ध्यान में रखते हुए एक समग्र निर्णय लें।

  6. ट्रेडों की विविधता के आधार पर उपयुक्त ट्रेडों का चयन करें।

  7. मशीन लर्निंग एल्गोरिदम को शामिल करने पर विचार करें और रणनीति को स्वचालित रूप से अनुकूलित करें।

संक्षेप

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

रणनीति स्रोत कोड
/*backtest
start: 2023-10-01 00:00:00
end: 2023-10-31 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(title="CCI Strategy", overlay=true, initial_capital = 10000, default_qty_value = 10000, default_qty_type = strategy.cash)


//CCI Code

length = input(20, minval=1, title="CCI Length")
src = input(close, title="Source")
ma = sma(src, length)
cci = (src - ma) / (0.015 * dev(src, length))


// Strategy Backtesting
startDate  = input(timestamp("2099-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


//Time Restriction Settings
startendtime = input("", title='Time Frame To Enter Trades')
enableclose = input(false, title='Enable Close Trade At End Of Time Frame')
timetobuy = true
timetoclose = true


//Strategy Settings

//Strategy Settings - Enable Check Boxes
enableentry = input(true, title="Enter First Trade ASAP")
enableconfirmation = input(false, title="Wait For Cross To Enter First Trade")
enablezero =input(true, title="Use CCI Simple Cross Line For Entries & Exits")
enablebands = input(false, title="Use Upper & Lower Bands For Entries & Exits")

//Strategy Settings - Band Sources
ccisource = input(0, title="CCI Simple Cross")
upperbandsource =input(100, title="CCI Enter Long Band")
upperbandexitsource =input(100, title="CCI Exit Long Band")
lowerbandsource =input(-100, title="CCI Enter Short Band")
lowerbandexitsource =input(-100, title="CCI Exit Short Band")

//Strategy Settings - Crosses
simplecrossup = crossover(cci, ccisource)
simplecrossdown = crossunder(cci, ccisource)
uppercrossup = crossover(cci, upperbandsource)
lowercrossdown = crossunder(cci, lowerbandsource)
uppercrossdown = crossunder(cci, upperbandexitsource)
lowercrossup = crossover(cci, lowerbandexitsource)
upperstop = crossunder(cci, upperbandsource)
lowerstop = crossover(cci, lowerbandsource)


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

//Strategy Execution - Simple Line Cross
if (cci > ccisource and enablezero and enableentry and time_cond and timetobuy)
    strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (cci < ccisource and enablezero and enableentry and time_cond and timetobuy)
    strategy.entry("Short", strategy.short, alert_message = message_entershort)

if (simplecrossup and enablezero and enableconfirmation and time_cond and timetobuy)
    strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (simplecrossdown and enablezero and enableconfirmation and time_cond and timetobuy)
    strategy.entry("Short", strategy.short, alert_message = message_entershort)

//Strategy Execution - Upper and Lower Band Entry
if (uppercrossup and enablebands and time_cond and timetobuy)
    strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (lowercrossdown and enablebands and time_cond and timetobuy)
    strategy.entry("Short", strategy.short, alert_message = message_entershort)

//Strategy Execution - Upper and Lower Band Exit
if strategy.position_size > 0 and uppercrossdown and enablebands and time_cond and timetobuy
    strategy.close_all(alert_message = message_closelong)
if strategy.position_size < 0 and lowercrossup and enablebands and time_cond and timetobuy
    strategy.close_all(alert_message = message_closeshort)

//Strategy Execution - Upper and Lower Band Stops
if strategy.position_size > 0 and upperstop and enablebands and time_cond and timetobuy
    strategy.close_all(alert_message = message_closelong)
if strategy.position_size < 0 and lowerstop and enablebands and time_cond and timetobuy
    strategy.close_all(alert_message = message_closeshort)

//Strategy Execution - Close Trade At End Of Time Frame    
if strategy.position_size > 0 and timetoclose and enableclose and time_cond
    strategy.close_all(alert_message = message_closelong)
if strategy.position_size < 0 and timetoclose and enableclose and time_cond
    strategy.close_all(alert_message = message_closeshort)

//Strategy Execution - Stop Loss and Take Profit
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)