ईएमए क्रॉसओवर पर आधारित रणनीति के बाद की प्रवृत्ति

लेखक:चाओझांग, दिनांकः 2023-09-15 11:51:34
टैगः

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

I. रणनीतिक तर्क

मूल नियम हैंः

  1. तेजी से ईएमए और धीमी ईएमए सेट करें, मूल्य परिवर्तन संवेदनशीलता के लिए तेजी से ईएमए और प्रवृत्ति के लिए धीमी ईएमए के साथ।

  2. धीमी ईएमए के ऊपर तेजी से ईएमए क्रॉसओवर पर लंबा, और नीचे क्रॉसओवर पर छोटा जाएं।

  3. झूठे संकेतों को कम करने के लिए EMA अनुपात सेट करें जहां धीमी अवधि ≥ 3 गुना तेज अवधि है।

  4. विपरीत प्रवृत्ति के व्यापार से बचने के लिए केवल लंबी मोड का विकल्प।

  5. पैरामीटर अनुकूलन के लिए अनुकूलन योग्य बैकटेस्ट अवधि।

ईएमए मापदंडों को समायोजित करके, संवेदनशीलता और स्थिरता को रुझानों का लाभ उठाने के लिए संतुलित किया जा सकता है।

II. रणनीति के फायदे

इसका सबसे बड़ा लाभ उपयोग में आसानी के लिए सरलता है, जो समय-सीमित व्यापारियों के लिए उपयुक्त है।

एक और लाभ पैरामीटर अनुकूलन के माध्यम से whipsaws को कम करने की क्षमता है।

अंत में, केवल-लंबा मोड विपरीत-प्रवृत्ति के कारोबार से बचता है और शेयरों जैसे कुछ बाजारों के लिए उपयुक्त है।

III. संभावित कमजोरियां

हालांकि, कुछ मुद्दे मौजूद हैंः

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

दूसरा, अनुचित सेटिंग्स अत्यधिक फ़िल्टर हो सकती हैं जिससे चूक गए ट्रेड हो सकते हैं।

अंत में, स्टॉप लॉस और टेक प्रॉफिट तंत्र में सुधार की आवश्यकता है।

IV. सारांश

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


/*backtest
start: 2023-08-15 00:00:00
end: 2023-09-12 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
// 
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © gregoirejohnb
//
// Moving average crossover systems measure drift in the market. They are great strategies for time-limited people.
// So, why don't more people use them?
// 
// I think it's due to poor choice in choosing EMA lengths: Market Wizard Ed Seykota has a guideline for moving average crossovers: the slow line should be at least 3x the fast line.
// This removes a lot of the whipsaws inherent in moving average systems, which means greater profitability.
// His other piece of advice: long-only strategies are best in stock markets where there's a lot more upside potential.
//
// Using these simple rules, we can reduce a lot of the whipsaws and low profitability trades! This strategy was made so you can see for yourself before trading.
//
// === HOW TO USE THIS INDICATOR ===
// 1) Choose your market and timeframe.
// 2) Choose the length.
// 3) Choose the multiplier.
// 4) Choose if the strategy is long-only or bidirectional. 
//
// Don't overthink the above! We don't know the best answers, that's why this strategy exists! We're going to test and find out.
//  After you find a good combination, set up an alert system with the default Exponential Moving Average indicators provided by TradingView.
//
// === TIPS ===
// Increase the multiplier to reduce whipsaws (back and forth trades).
// Increase the length to take fewer trades, decrease the length to take more trades.
// Try a Long-Only strategy to see if that performs better.
//
strategy(title="EMA Crossover Strategy", shorttitle="EMA COS", overlay=true, pyramiding=0, default_qty_type=strategy.percent_of_equity, default_qty_value=10, currency=currency.USD,commission_type=strategy.commission.percent,commission_value=0.1)

// === GENERAL INPUTS ===
//strategy start date
start_year = input(defval=2020, title="Backtest Start Year")

// === LOGIC ===
length = input(type=input.integer,defval=20,minval=1,title="Length")
ratio = input(type=input.integer,defval=3,title="Multiplier (3x length, 4x length, etc)",options=[3,4,5,6,7,8,9,10])
longOnly = input(type=input.bool,defval=false,title="Long Only")
fast = ema(hl2,length)
slow = ema(hl2,length * ratio)
plot(fast,linewidth=2,color=color.orange,title="Fast")
plot(slow,linewidth=2,color=color.blue,title="Slow")

longEntry = crossover(fast,slow)
shortEntry = crossunder(fast,slow)

plotshape(longEntry ? close : na,style=shape.triangleup,color=color.green,location=location.belowbar,size=size.small,title="Long Triangle")
plotshape(shortEntry and not longOnly ? close : na,style=shape.triangledown,color=color.red,location=location.abovebar,size=size.small,title="Short Triangle")
plotshape(shortEntry and longOnly ? close : na,style=shape.xcross,color=color.black,location=location.abovebar,size=size.small,title="Exit Sign")

// === STRATEGY - LONG POSITION EXECUTION ===
enterLong() =>
    crossover(fast,slow) and 
       time > timestamp(start_year, 1, 1, 01, 01)
exitLong() =>
    longOnly and crossunder(fast,slow)
strategy.entry(id="Long", long=strategy.long, when=enterLong())
strategy.close(id="Long", when=exitLong())
// === STRATEGY - SHORT POSITION EXECUTION ===
enterShort() =>
    not longOnly and crossunder(fast,slow) and 
       time > timestamp(start_year, 1, 1, 01, 01)
exitShort() =>
    false
strategy.entry(id="Short", long=strategy.short, when=enterShort())
strategy.close(id="Short", when=exitShort())

अधिक