तीन बार और चार बार ब्रेकआउट रिवर्स रणनीति

लेखक:चाओझांग, दिनांक: 2023-12-18 10:39:53
टैगः

img

अवलोकन

थ्री बार और फोर बार ब्रेकआउट रिवर्सन रणनीति मजबूत गति के साथ तीन या चार के-लाइन बार की पहचान करती है, और कई छोटी सीमा के के-बार के समर्थन / प्रतिरोध स्तर बनाने और उलट सिग्नल उभरने के बाद काउंटर-ट्रेंड ट्रेड करती है। यह औसत-रिवर्सन रणनीति से संबंधित है।

रणनीति तर्क

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

  1. बड़ी रेंज की सलाखों को पहचानें (Gap Bars): ब्रेक 1.5 x एटीआर, 65% से अधिक शरीर प्रतिशत के साथ। उन्हें मजबूत गति माना जाता है।

  2. कम रेंज बार (संग्रह करने वाले बार) को पहचानें: गैप बार के बाद एक या दो बाद के छोटे रेंज बार, गैप बार के करीब उच्च / निम्न स्तर के साथ। वे धीमी गति और समेकन का प्रतिनिधित्व करते हैं, समर्थन / प्रतिरोध स्तर बनाते हैं।

  3. रिवर्स सिग्नल बार को पहचानें: यदि एक बार समेकन के बाद पिछले बार के उच्च / निम्न के माध्यम से टूट जाता है, तो इसे रिवर्स सिग्नल माना जा सकता है। हम सिग्नल बार की दिशा के आधार पर स्थिति लेते हैं।

  4. स्टॉप लॉस और टेक प्रॉफिट: स्टॉप लॉस को गैप बार के निचले/उच्च बिंदुओं से नीचे/ऊपर सेट करें। टेक प्रॉफिट को स्टॉप लॉस दूरी से जोखिम-लाभ अनुपात को गुणा करके निर्धारित किया जाता है।

लाभ विश्लेषण

इस रणनीति के मुख्य फायदे:

  1. कच्चे मूल्य क्रिया का उपयोग करके रुझानों और उलटफेरों की पहचान करें, कोई संकेतकों की आवश्यकता नहीं है।

  2. गैप बार और कलेक्टिंग बार पर सख्त नियम वास्तविक रुझानों और समेकन को पकड़ने में सटीकता सुनिश्चित करते हैं।

  3. शरीरों द्वारा रिवर्स बार का न्याय करना झूठे संकेतों को कम करता है।

  4. प्रत्येक व्यापार में केवल 3-4 बार लगते हैं।

  5. स्टॉप लॉस और टेक प्रॉफिट पर स्पष्ट नियम जोखिम प्रबंधन को आसान बनाते हैं।

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

मुख्य जोखिम:

  1. पैरामीटर सेटिंग्स पर निर्भर करता है। ढीले पैरामीटर झूठे संकेत और खोने वाले ट्रेडों को बढ़ाते हैं।

  2. नकली पलायन के लिए कमजोर और सभी झूठे संकेतों को फ़िल्टर करने में असमर्थ।

  3. असफल ब्रेकआउट के प्रयासों के बाद समेकन में फंसने का जोखिम। ऐसे मामलों में घाटे में कटौती करना मुश्किल है।

  4. व्यापक स्टॉप लॉस रेंज का अर्थ है कभी-कभी फंसे होने पर बड़े नुकसान।

जोखिम को कम करने के लिए:

  1. गैप बार और संग्रहण बार की पहचान के लिए मापदंडों का अनुकूलन करें।

  2. पदों में प्रवेश करने से पहले पुष्टिकरण बार जैसे फ़िल्टर जोड़ें.

  3. स्टॉप लॉस एल्गोरिदम को अनुकूलित करें ताकि उन्हें अधिक अनुकूलनशील बनाया जा सके।

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

मुख्य अनुकूलन दिशाएं:

  1. झूठे ब्रेकआउट से बचने के लिए कम्पोजिट फिल्टर जोड़ें, जैसे कि वॉल्यूम में वृद्धि की आवश्यकता होती है।

  2. चलती औसत के साथ संयोजन करें, केवल संकेत लें जब प्रमुख एमए स्तर टूट जाएं।

  3. ट्रेडों में प्रवेश करने से पहले कई समय सीमाओं में सहमति की आवश्यकता होती है।

  4. बाजार की अस्थिरता और जोखिम वरीयता के आधार पर लाभ लक्ष्यों को गतिशील रूप से समायोजित करें।

  5. बाजार व्यवस्था पहचान प्रणाली के साथ संयोजन, केवल प्रवृत्ति वातावरण में रणनीति सक्षम करें।

ये अनुकूलन स्थिरता और लाभप्रदता में और सुधार कर सकते हैं।

निष्कर्ष

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


/*backtest
start: 2023-12-10 00:00:00
end: 2023-12-17 00:00:00
period: 5m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy(title="Three (3)-Bar and Four (4)-Bar Plays Strategy", shorttitle="Three (3)-Bar and Four (4)-Bar Plays Strategy", overlay=true, calc_on_every_tick=true, currency=currency.USD, default_qty_value=1.0,initial_capital=30000.00,default_qty_type=strategy.percent_of_equity)

frommonth = input(defval = 1, minval = 01, maxval = 12, title = "From Month")
fromday = input(defval = 1, minval = 01, maxval = 31, title = "From day")
fromyear = input(defval = 2021, minval = 1900, maxval = 2100, title = "From Year")

tomonth = input(defval = 12, minval = 01, maxval = 12, title = "To Month")
today = input(defval = 31, minval = 01, maxval = 31, title = "To day")
toyear = input(defval = 2100, minval = 1900, maxval = 2100, title = "To Year")

garBarSetting1 = input(defval = 1.5, minval = 0.0, maxval = 100.0, title = "Gap Bar Size", type = input.float)
garBarSetting2 = input(defval = 0.65, minval = 0.0, maxval = 100.0, title = "Gap Bar Body Size", type = input.float)
TopSetting = input(defval = 0.10, minval = 0.0, maxval = 100.0, title = "Bull Top Bar Size", type = input.float)

profitMultiplier = input(defval = 2.0, minval = 1.0, maxval = 100.0, title = "Profit Multiplier", type = input.float)

// ========== 3-Bar and 4-Bar Play Setup ==========
barSize = abs(high - low)
bodySize = abs(open - close)

gapBar = (barSize > (atr(1000) * garBarSetting1)) and (bodySize >= (barSize * garBarSetting2))  // find a wide ranging bar that is more than 2.5x the size of the average bar size and body is at least 65% of bar size

bullTop = close > close[1] + barSize[1] * TopSetting ? false : true  // check if top of bar is relatively equal to top of the gap bar (first collecting bull bar)
bullTop2 = close > close[2] + barSize[2] * TopSetting ? false : true  // check if top of bar is relatively equal to top of the gap bar (first collecting bear bar)
bearTop = close < close[1] - barSize[1] * TopSetting ? false : true  // check if top of bar is relatively equal to top of the gap bar (second collecting bull bar)
bearTop2 = close < close[2] - barSize[2] * TopSetting ? false : true  // check if top of bar is relatively equal to top of the gap bar (second collecting bear bar)

collectingBarBull = barSize < barSize[1] / 2 and low > close[1] - barSize[1] / 2 and bullTop  // find a collecting bull bar
collectingBarBear = barSize < barSize[1] / 2 and high < close[1] + barSize[1] / 2 and bearTop  // find a collecting bear bar
collectingBarBull2 = barSize < barSize[2] / 2 and low > close[2] - barSize[2] / 2 and bullTop2  // find a second collecting bull bar
collectingBarBear2 = barSize < barSize[2] / 2 and high < close[2] + barSize[2] / 2 and bearTop2  // find a second collecting bear bar

triggerThreeBarBull = close > close[1] and close > close[2] and high > high[1] and high > high[2]  // find a bull trigger bar in a 3 bar play
triggerThreeBarBear = close < close[1] and close < close[2] and high < high[1] and high < high[2]  // find a bear trigger bar in a 3 bar play
triggerFourBarBull = close > close[1] and close > close[2] and close > close[3] and high > high[1] and high > high[2] and high > high[3]  // find a bull trigger bar in a 4 bar play
triggerFourBarBear = close < close[1] and close < close[2] and close < close[3] and high < high[1] and high < high[2] and high < high[3]  // find a bear trigger bar in a 4 bar play

threeBarSetupBull = gapBar[2] and collectingBarBull[1] and triggerThreeBarBull  // find 3-bar Bull Setup
threeBarSetupBear = gapBar[2] and collectingBarBear[1] and triggerThreeBarBear  // find 3-bar Bear Setup
fourBarSetupBull = gapBar[3] and collectingBarBull[2] and 
   collectingBarBull2[1] and triggerFourBarBull  // find 4-bar Bull Setup
fourBarSetupBear = gapBar[3] and collectingBarBear[2] and 
   collectingBarBear2[1] and triggerFourBarBear  // find 4-bar Bear Setup

labels = input(title="Show Buy/Sell Labels?", type=input.bool, defval=true)

plotshape(threeBarSetupBull and labels, title="3-Bar Bull", text="3-Bar Play", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=color.green, textcolor=color.white, transp=0)
plotshape(threeBarSetupBear and labels, text="3-Bar Bear", title="3-Bar Play", location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.red, textcolor=color.white, transp=0)
plotshape(fourBarSetupBull and labels, title="4-Bar Bull", text="4-Bar Play", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=color.green, textcolor=color.white, transp=0)
plotshape(fourBarSetupBear and labels, text="4-Bar Bear", title="4-Bar Play", location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.red, textcolor=color.white, transp=0)

alertcondition(threeBarSetupBull or threeBarSetupBear or fourBarSetupBull or fourBarSetupBear, title="3-bar or 4-bar Play", message="Potential 3-bar or 4-bar Play")
float sl = na
float tp = na
sl := nz(sl[1], 0.0)
tp := nz(tp[1], 0.0)
plot(sl==0.0?na:sl,title='SL', color = color.red)
plot(tp==0.0?na:tp,title='TP', color = color.green)
if (true)
    if threeBarSetupBull and strategy.position_size <=0
        strategy.entry("3 Bar Long", strategy.long, when=threeBarSetupBull)
        sl :=low[1]
    if threeBarSetupBear and strategy.position_size >=0
        strategy.entry("3 Bar Short", strategy.short, when=threeBarSetupBull)
        sl :=high[1]
    if fourBarSetupBull and strategy.position_size <=0
        strategy.entry("4 Bar Long", strategy.long, when=fourBarSetupBull)
        sl :=min(low[1], low[2])
    if fourBarSetupBear and strategy.position_size >=0
        strategy.entry("4 Bar Short", strategy.short, when=fourBarSetupBear)
        sl :=max(high[1], high[2])

if sl !=0.0
    if strategy.position_size > 0
        tp := strategy.position_avg_price + ((strategy.position_avg_price - sl) * profitMultiplier)
        strategy.exit(id="Exit", limit=tp, stop=sl)

    if strategy.position_size < 0
        tp := strategy.position_avg_price - ((sl - strategy.position_avg_price) * profitMultiplier)
        strategy.exit(id="Exit", limit=tp, stop=sl)

अधिक