विलियम्स की मगरमच्छ स्केलिंग रणनीति

लेखक:चाओझांग, दिनांक: 2023-09-25 17:42:27
टैगः

अवलोकन

यह रणनीति बिल विलियम्स मगरमच्छ संकेतक पर आधारित है लेकिन मूल्य इनपुट के रूप में हेकेन आशी मोमबत्तियों का उपयोग करती है। यह 1 मिनट से 5 मिनट के समय सीमा के लिए उपयुक्त एक अल्पकालिक स्केलिंग रणनीति है।

रणनीति तर्क

रणनीति के मुख्य व्यापारिक सिद्धांत हैंः

  1. मूल्य कार्रवाई के लिए नियमित मोमबत्तियों के बजाय हेकेन आशी मोमबत्तियों का उपयोग करना। हेकेन आशी शोर को फ़िल्टर करता है और प्रवृत्ति की पहचान करता है।

  2. बिल विलियम्स के मगरमच्छ से तीन चलती औसत रेखाओं को लागू करते हुए - जबड़े, दांत और होंठ। वे प्रवृत्ति की दिशा निर्धारित करने के लिए चलती औसत की तरह कार्य करते हैं।

  3. जब रेखाओं को Jaw (सबसे कम), Teeth (मध्य), Lips (उच्चतम) के रूप में ढेर किया जाता है, तो यह एक अपट्रेंड का संकेत देता है। जब Jaw (उच्चतम), Teeth (मध्य), Lips (सबसे कम) के साथ उलट दिया जाता है, तो यह एक डाउनट्रेंड का संकेत देता है।

  4. प्रविष्टियाँ हेकेन आशि मोमबत्ती दिशा + मगरमच्छ रेखा संरेखण पर आधारित हैं। तेजी से मोमबत्तियों और बैल सेटअप पर लंबी प्रविष्टियाँ; मंदी मोमबत्तियों और भालू सेटअप पर छोटी प्रविष्टियाँ।

  5. जब मगरमच्छ की रेखाएं पार हो जाती हैं, तो बाहर निकलता है, जो प्रवृत्ति के उलट होने का संकेत देता है।

  6. जोखिम प्रबंधन के लिए उपयोग किए जाने वाले फिक्स्ड टेक प्रॉफिट, स्टॉप लॉस पॉइंट्स। लक्ष्य पॉइंट्स, स्टॉप लॉस पॉइंट्स, ट्रेलिंग स्टॉप आदि को कॉन्फ़िगर कर सकते हैं।

हेकेन एशी और मगरमच्छ के दोहरे फ़िल्टरों का संयोजन एक उच्च संभावना अल्पकालिक व्यापार रणनीति बनाता है।

लाभ

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

  1. दोहरी संकेतक फ़िल्टरिंग झूठे संकेतों को कम करती है। हेकेन एशी + मगरमच्छ संकेत की गुणवत्ता में सुधार करता है।

  2. स्पष्ट और सहज ट्रेंड पहचान. मगरमच्छ रेखाओं में स्पष्ट बैल/हरे के संकेत होते हैं.

  3. अल्पकालिक स्केलिंग के लिए कुशल। 1 मिनट से 5 मिनट के चार्ट पर मूल्य उतार-चढ़ाव को कैप्चर करता है।

  4. सरल मापदंडों. कोई जटिल अनुकूलन की आवश्यकता नहीं है.

  5. लाभ लेने, हानि रोकने के बिंदुओं के माध्यम से सख्त जोखिम प्रबंधन।

  6. मगरमच्छ लाइन क्रॉसिंग के आधार पर परिभाषित प्रवेश/निकास नियम।

  7. लागू करने और दोहराने में आसान है।

जोखिम

विचार करने के लिए मुख्य जोखिम हैंः

  1. Whipsaws से ड्रॉडाउन जोखिम. लगातार मगरमच्छ संकेत व्यापार और लागत को बढ़ा सकते हैं.

  2. सीमाबद्ध बाजार जोखिम क्रॉसओवर चंचल परिस्थितियों के दौरान विफल हो जाते हैं।

  3. ओवर-ऑप्टिमाइज़ेशन जोखिम, खराब पैरामीटर ट्यूनिंग से वक्र फिट।

  4. सूचक विफलता का खतरा. चरम परिस्थितियों में मगरमच्छ काम करना बंद कर सकता है.

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

  6. उच्च व्यापारिक आवृत्ति जोखिम। अधिक व्यापार लेनदेन की लागत को भी बढ़ाता है।

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

बढ़ोतरी के अवसर

रणनीति में सुधार करने के कुछ तरीके हैंः

  1. अधिक जीत दर के लिए आरएसआई जैसे अतिरिक्त फ़िल्टर शामिल करें।

  2. प्रति व्यापार हानि को नियंत्रित करने के लिए गतिशील एटीआर स्टॉप का प्रयोग करें।

  3. दांव के आकार को अनुकूलित करने के लिए स्थिति आकार नियम जोड़ें। प्रवृत्ति की ताकत के साथ वृद्धि करें।

  4. प्रवेश समय के लिए चार्ट पैटर्न या अन्य तकनीकी विश्लेषण को मिलाएं।

  5. साधन के प्रकार (स्टॉक, विदेशी मुद्रा आदि) के आधार पर मापदंडों का अनुकूलन करें।

  6. अनुकूलन पैरामीटर अनुकूलन के लिए मशीन लर्निंग का परिचय।

  7. लाभ लेने बनाम स्टॉप लॉस अनुपात को ठीक करने के लिए अपेक्षा विश्लेषण करना।

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

निष्कर्ष

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


/*backtest
start: 2022-09-18 00:00:00
end: 2023-09-24 00:00:00
period: 4d
basePeriod: 1d
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/
// © 03.freeman
//Scalping strategy based on Bill Williams Alligator technique but applied to heikin ashi candles
//This strategy has to be applied to standard candles and low time frames (1min to 5min)
//@version=4
strategy("Bill Williams Alligator improved", shorttitle="Scalping alligator",overlay=true)
//source = input(close)
useHA = input (true,"Use heikin ashi candle?")

// ----------MA calculation - ChartArt-------------
smoothinput = input(1, minval=1, maxval=5, title='Moving Average Calculation: (1=SMA), (2=EMA), (3=WMA), (4=Linear), (5=VWMA)')

calc_ma(src,l) => 
    smoothinput == 1 ? sma(src, l):smoothinput == 2 ? ema(src, l):smoothinput == 3 ? wma(src, l):smoothinput == 4 ? linreg(src, l,0):smoothinput == 5 ? vwma(src,l):na
//----------------------------------------------

heikinashi_close = security(heikinashi(syminfo.tickerid), timeframe.period, close)
heikinashi_open = security(heikinashi(syminfo.tickerid), timeframe.period, open)
heikinashi_hl2 = security(heikinashi(syminfo.tickerid), timeframe.period, hl2)

direzione=heikinashi_close>heikinashi_open and heikinashi_close[1]>heikinashi_open[1]? 1 : heikinashi_close<heikinashi_open and heikinashi_close[1]<heikinashi_open[1]? -1 : 0

jawLength = input(13, minval=1, title="Jaw Length")
teethLength = input(8, minval=1, title="Teeth Length")
lipsLength = input(5, minval=1, title="Lips Length")
jawOffset = input(8, title="Jaw Offset")
teethOffset = input(5, title="Teeth Offset")
lipsOffset = input(3, title="Lips Offset")
jaw = calc_ma(heikinashi_hl2, jawLength)
teeth = calc_ma(heikinashi_hl2, teethLength)
lips = calc_ma(heikinashi_hl2, lipsLength)
plot(jaw, title="jaw",offset = jawOffset, color=#3BB3E4)
plot(teeth, title="teeth",offset = teethOffset, color=#FF006E)
plot(lips, title="lips",offset = lipsOffset, color=#36C711)

longCondition = direzione[0]==1 and jaw<teeth and jaw<lips and teeth<lips 
shortCondition = direzione[0]==-1 and jaw>teeth and jaw>lips and teeth>lips


//  Strategy: (Thanks to JayRogers)
// === STRATEGY RELATED INPUTS ===
//tradeInvert     = input(defval = false, title = "Invert Trade Direction?")
// the risk management inputs
inpTakeProfit   = input(defval = 0, title = "Take Profit Points", minval = 0)
inpStopLoss     = input(defval = 0, title = "Stop Loss Points", minval = 0)
inpTrailStop    = input(defval = 0, title = "Trailing Stop Loss Points", minval = 0)
inpTrailOffset  = input(defval = 0, title = "Trailing Stop Loss Offset Points", minval = 0)

// === RISK MANAGEMENT VALUE PREP ===
// if an input is less than 1, assuming not wanted so we assign 'na' value to disable it.
useTakeProfit   = inpTakeProfit  >= 1 ? inpTakeProfit  : na
useStopLoss     = inpStopLoss    >= 1 ? inpStopLoss    : na
useTrailStop    = inpTrailStop   >= 1 ? inpTrailStop   : na
useTrailOffset  = inpTrailOffset >= 1 ? inpTrailOffset : na

// === STRATEGY - LONG POSITION EXECUTION ===
enterLong() => direzione[0]==1 and jaw<teeth and jaw<lips and teeth<lips // functions can be used to wrap up and work out complex conditions
exitLong() => jaw>teeth or jaw>lips or teeth>lips
strategy.entry(id = "Buy", long = true, when = enterLong() )    // use function or simple condition to decide when to get in
strategy.close(id = "Buy", when = exitLong() )                  // ...and when to get out

// === STRATEGY - SHORT POSITION EXECUTION ===
enterShort() => direzione[0]==-1 and jaw>teeth and jaw>lips and teeth>lips
exitShort() => jaw<teeth or jaw<lips or teeth<lips
strategy.entry(id = "Sell", long = false, when = enterShort())
strategy.close(id = "Sell", when = exitShort() )

// === STRATEGY RISK MANAGEMENT EXECUTION ===
// finally, make use of all the earlier values we got prepped
strategy.exit("Exit Buy", from_entry = "Buy", profit = useTakeProfit, loss = useStopLoss, trail_points = useTrailStop, trail_offset = useTrailOffset)
strategy.exit("Exit Sell", from_entry = "Sell", profit = useTakeProfit, loss = useStopLoss, trail_points = useTrailStop, trail_offset = useTrailOffset)

// === Backtesting Dates === thanks to Trost

testPeriodSwitch = input(false, "Custom Backtesting Dates")
testStartYear = input(2020, "Backtest Start Year")
testStartMonth = input(1, "Backtest Start Month")
testStartDay = input(1, "Backtest Start Day")
testStartHour = input(0, "Backtest Start Hour")
testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay,testStartHour,0)
testStopYear = input(2020, "Backtest Stop Year")
testStopMonth = input(12, "Backtest Stop Month")
testStopDay = input(31, "Backtest Stop Day")
testStopHour = input(23, "Backtest Stop Hour")
testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay,testStopHour,0)
testPeriod() =>
    time >= testPeriodStart and time <= testPeriodStop ? true : false
isPeriod = true
// === /END

if not isPeriod
    strategy.cancel_all()
    strategy.close_all()

अधिक