8 High Probability Bulkowski Candlestick Patterns
Forums › ProRealTime English forum › ProBuilder support › 8 High Probability Bulkowski Candlestick Patterns
- This topic has 11 replies, 5 voices, and was last updated 5 years ago by Bard.
Tagged: candlestick patterns, candlesticks, patterns
-
-
03/23/2019 at 4:57 PM #94507
Updates to Violets’ “Trend Reversal and Continuation Patterns:” https://www.prorealcode.com/prorealtime-market-screeners/trend-reversal-continuation-patterns/
For the Morning Star pattern I have striked out the trend filter to highlight the effect that the trend mode can have (in that it can result in patterns not being produced on chart).
Bulkowski Performance Statistics for each of the 8 Patterns in the Indicator (and more) : https://www.dropbox.com/s/0gq5ypd6gwc3h7e/Bulkowski%20-%20PERFORMANCE%20RANKINGS%20-%20Encyclopedia-of-Candlestick-Charts.pdf?dl=0
In the case of the very rare and highest probability pattern, the Bearish Three Line Strike Up, it actually produced a 683 times initial risk per/ tick return in Canadian Pacific Railways (US) Ltd that I traded as an experiment of the patterns behaviour. “Beginners” luck, lol…
8 High Probability Bulkowski Candlestick Patterns123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329// 8 High Probability Bulkowski Candlestick Patterns//// The 8 most powerful classical Candlestick Patterns// Trend reversal and continuation patterns// Coded by Violet/Additions by Bard// 4-12-2017 / 23/03/2019//// Based on the work of Thomas Bulkowski in his book: "Encyclopedia of Candlestick Charts", 2008// Read a summary here: https://www.investopedia.com/articles/active-trading/092315/5-most-powerful-candlestick-patterns.asp//// This *market-wide screener* works along similar lines as this *fund-specific indicator* in the PRC library list: "Candlestick patterns recognition"//text colorr = 255g = 51b = 51// DrawTextoffset1 = 50 * pipsizeoffset2 = offset1 * 6// Trend direction identification//(choose 0=No Trend check, 1=MACD, 2=SAR[default], 3=Directional Movement, 4=Moving Averagea crossing)TDS=3//Trend Detectionif TDS=0 thenTrendUp=3TrendDown=3elseif TDS=1 thenTrendUp=(MACDline[12,26,9](close)>0 AND MACD[12,26,9](close)>0)TrendDown=(MACDline[12,26,9](close)<0 AND MACD[12,26,9](close)<0)elseif TDS=2 thenTrendUp=(SAR[0.02,0.02,0.2]<low)TrendDown=(SAR[0.02,0.02,0.2]>high)elseif TDS=3 thenTrendUp=(ADX[30]>25 AND DI[30](close)>0) //Default =[14] & >23TrendDown=(ADX[30]>25 AND DI[30](close)<0)elseif TDS=4 thenTrendUp=(Average[3](close)>Average[12](close))TrendDown=(Average[3](close)<Average[12](close))endifendifendifendifendif//// Signal codes and pattern types//**************************************************************************// Name of pattern Type Direction Accuracy rate Bulkowski's Occurrence//// ------- ------------ ------------ ----------// 1 = BearishThreeLineStrikeUp Bullish Reversal 84% Bull Mkt/77% Bear Mkt truly rare// 2 = BullishThreeLineStrikeDown Bearish Reversal 65% Bull Mkt/83% Bear Mkt truly rare// 3 = TwoBlackGappingDown Bearish Continuation 68% Bull Mkt/69% Bear Mkt common// 4 = ThreeBlackCrows Bearish Continuation 78% Bull Mkt/79% Bear Mkt abody// 5 = MorningStar Bullish Reversal 78% Bull Mkt/65% Bear Mkt very low// 6 = EveningStar Bearish Reversal 72% Bull Mkt/72% Bear Mkt very low// 7 = AbandonedBabyBull Bullish Reversal 70% Bull Mkt/55% Bear Mkt low// 8 = AbandonedBabyBear Bearish Reversal 69% Bull Mkt/52% Bear Mkt Bull Continuation low low//**************************************************************************//BearishThreeLineStrikeUp = 0BullishThreeLineStrikeDown = 0TwoBlackGappingDown = 0ThreeBlackCrows = 0MorningStar = 0EveningStar = 0AbandonedBabyBull = 0AbandonedBabyBear = 0signal = 0//Best Probability in Bull Markets// 1 - (Three Bears then Up) Bearish Three Line Strike Up *************************************// Bulkowski accuracy rate 84% in Bull Mkt, 77% in a Bear Mkt, frequency: very raret1 = close[3] < open[3] // candle 4 = red candlet2 = close[2] < open[2] and low[2] < low[3] and open[2] < open[3] // candle 3 = red candle, lower low & open than previous candlet3 = close[1] < open[1] and low[1] < low[2] and open[1] < open[2] // candle 2 = red candle and lower low & open than previous candlet4 = open[0] < low[1] and close[0] > open[3] // candle 1 = green candle, opens lower than previous candle and closes above open of 4th candle. The candle engulfs the bodies of the three preceding black candlesif TrendDown[3] AND t1 and t2 and t3 and t4 thenBearishThreeLineStrikeUp = 1endifif TrendUp[3] AND t1 and t2 and t3 and t4 thenBearishThreeLineStrikeUp = 1endifif TrendDown[3] AND t1 and t2 and t3 and t4 thenDRAWTEXT("Bearish Three Line Strike Up", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endifif TrendUp[3] AND t1 and t2 and t3 and t4 thenDRAWTEXT("Bearish Three Line Strike Up", barindex, high, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// 5 Morning Star **************************************************// Bullish reversal of the downward price trend 78% of the (in a longer term up trend). 65% in a Bear Mkt. Size of price move better in downtrends if time limit of 10 days otherwise uptrends that are left to run are better. Ranked 6th for performance.//Bearish Pinbarbearishbody = ABS(open-close)bearishwick = ABS(high-close)//bearishnose = ABS(close-low)Body = abs(close - open) //definition of bodyRangeSize = average[50,0](range) //average of the range size of the last 50 candlesLongCandle = Body > (RangeSize * 0.9) //LongCandle is true if the size exceeds a percentage of the average RangeSizeLongCandle2 = Body > (RangeSize * 0.6) //LongCandle is true if the size exceeds a percentage of the average RangeSizee1 = close[2] < open[2] AND LongCandle // red candlee2 = open[1] < close[2] and close[1] < close[2] and low[1] < close[2] // candle entirely below predecessor’s bodye3 = close[0] > open[0] and open[0] > open[1] and low[0] < high[1] and LongCandle2 // green candle with a gape4 = range[1] < (range[2] / 2 ) // morning star’s range is small compared to preceding candlee5 = bearishwick/bearishbody < 30/100 // Small Bullish Pinbar/No exhaustionif e1 and e2 and e3 and e4 and e5 thenMorningStar = 1 //TrendDown[3] ANDendifif TrendUp[3] AND e1 and e2 and e3 and e4 and e5 thenMorningStar = 1endifif e1 and e2 and e3 and e4 then //TrendDown[3] ANDDRAWTEXT("Morning Star", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endifif TrendUp[3] AND e1 and e2 and e3 and e4 thenDRAWTEXT("Morning Star", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// 7 - Abandoned baby, Bullish Reversal aka Morning Star but with the flatline of a doji ***********************// Bulkowski accuracy rate 70%, 55% in a Bear Mkt, frequency: lowa1 = high[1] < low[2] // gapa2 = high[1] < low[0] // gapa3 = abs(open[1]-close[1]) < ( range[1] / 2 ) // doji likeif TrendDown[3] AND a1 and a2 and a3 thenAbandonedBabyBull = 1endifif TrendDown[3] AND a1 and a2 and a3 thenDRAWTEXT("Abandoned Baby Bull", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif//Best Probability in Bear Markets// 2 - (Three Bulls then Down) Bullish Three Line Strike Down *************************************// Bulkowski accuracy rate - bearish reversal 65% of the time in Bull and 83% in Bear, frequency: very raret1 = close[3] > open[3] // candle 4 = green candlet2 = close[2] > open[2] and high[2] > high[3] and open[2] > open[3] // candle 3 = green candle, higher low & open than previous candlet3 = close[1] > open[1] and high[1] > high[2] and open[1] > open[2] // candle 2 = green candle and higher low & open than previous candlet4 = open[0] > low[1] and close[0] < open[3] // candle 1 = red candle, opens higher than previous candle and closes below open of 4th candle. The candle engulfs the bodies of the three preceding green candlesif TrendUp[3] AND t1 and t2 and t3 and t4 thenBullishThreeLineStrikeDown = 1endifif TrendDown[3] AND t1 and t2 and t3 and t4 thenBullishThreeLineStrikeDown = 1endifif TrendUp[3] AND t1 and t2 and t3 and t4 thenDRAWTEXT("Bullish Three Line Strike Down", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endifif TrendDown[3] AND t1 and t2 and t3 and t4 thenDRAWTEXT("Bullish Three Line Strike Down", barindex, high, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// 3 - Bearish Two Black Gapping *************************// Bulkowski accuracy rate 69% in Bear Mkt, 68% in Bull Mkt, frequency: commonb1 = close[1] < open[1] // red candleb2 = close[0] < open[0] // followed by another red candleb3 = high[0] < low[1] // with a down gap in betweenif TrendUp[3] AND b1 and b2 and b3 thenTwoBlackGappingDown = 1endifif TrendDown[3] AND b1 and b2 and b3 thenTwoBlackGappingDown = 1endifif TrendUp[3] AND b1 and b2 and b3 thenDRAWTEXT("Two Black Gapping Down", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endifif TrendDown[3] AND b1 and b2 and b3 thenDRAWTEXT("Two Black Gapping Down", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// 4 - Three Black Crows *********************************// Bulkowski accuracy rate 78% in Bull Mkt, 79% Bear Mkt frequency: very commonc1 = close[2] < open[2]c2 = close[1] < open[1] and close[1] < low[2]c3 = close[0] < open[0] and close[0] < low[1]// Closing prices are less than 1/3 from lowsc4 = abs(close[2] -low[2]) < range[2] / 3c5 = abs(close[1] -low[1]) < range[1] / 3c6 = abs(close[0] -low[0]) < range[0] / 3if c1 and c2 and c3 and c4 and c5 and c6 thenThreeBlackCrows = 1 //TrendDown[3] ANDendifif c1 and c2 and c3 and c4 and c5 and c6 thenThreeBlackCrows = 1 //TrendUp[3] ANDendifif c1 and c2 and c3 thenDRAWTEXT("Three Black Crows", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10) //TrendUp[3] ANDendifif c1 and c2 and c3 thenDRAWTEXT("Three Black Crows", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10) // TrendDown[3] ANDendif// 6 Evening Star **************************************************// Bulkowski accuracy rate 72% in Bull and 72% Bear Mkt, frequency lowe1 = close[2] > open[2] // green candlee2 = open[1] > close[2] and close[1] > close[2] and low[1] > close[2] // candle entirely above predecessor's bodye3 = close[0] < open[0] and high[0] < low[1] // red candle with a gape4 = range[1] < (range[2] / 2 ) // evening star's range is small compared to preceding candleif TrendDown[3] AND e1 and e2 and e3 and e4 thenEveningStar = 1endifif TrendUp[3] AND e1 and e2 and e3 and e4 thenEveningStar = 1endifif TrendUp[3] AND e1 and e2 and e3 thenDRAWTEXT("Evening Star", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endifif TrendDown[3] AND e1 and e2 and e3 thenDRAWTEXT("Evening Star", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// 8 - Abandoned baby, Bearish Reversal aka Evening Star but with the flatline of a doji. Trend doesn't last long ***********************// Bulkowski accuracy rate in Bull Mkt 69%, 52% in a Bear Mkt, frequency: lowa1 = close[2] > open[2] // green candlea2 = open[1] > close[2] and close[1] > close[2] and low[1] > high[2] // candle entirely above predecessor's bodya3 = close[0] < open[0] and low[1] > high[0] // red candle with a gapa4 = range[1] > (range[2] / 16 ) // range is small compared to preceding candle // Default (range[2] / 8 )if TrendDown[3] AND a1 and a2 and a3 and a4 thenAbandonedBabyBear = 1endifif TrendDown[3] AND a1 and a2 and a3 thenDRAWTEXT("Abandoned Baby Bear", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// Results ******************if BearishThreeLineStrikeUp thensignal = 1elsif BullishThreeLineStrikeDown thensignal = 2elsif TwoBlackGappingDown thensignal = 3elsif ThreeBlackCrows thensignal = 4elsif MorningStar thensignal = 5elsif EveningStar thensignal = 6elsif AbandonedBabyBull thensignal = 7elsif AbandonedBabyBear thensignal = 8endif//// Pattern types//**************************//Type = Name of pattern//---- -------------------// 1 = BearishThreeLineStrikeUp// 2 = BullishThreeLineStrikeDown// 3 = TwoBlackGappingDown// 4 = ThreeBlackCrows// 5 = MorningStar// 6 = EveningStar// 7 = AbandonedBabyBull// 8 = AbandonedBabyBear//**************************//Return signal > 003/23/2019 at 5:41 PM #9450903/23/2019 at 6:15 PM #94510More Candlestick Detection here using Top Movers:
03/23/2019 at 10:29 PM #94519A few observations since posting earlier:
A few small errors have been fixed like making sure all the a1, a2’s have been utilised in the Draw Text code.
I’m not sure the effect of have two sets of a1= etc and a2= etc, and t1= t2= etc overlapping conditions for two different patterns (Abandoned Baby’s and Three Line Strikes) both patterns appear on chart (and when applied as a separate indicator below the price chart) but I have reposted the amended code below with different conditional letters.
I think it’s better to strike out // the Trend Rules to produce more patterns and you can use your own judgement as to the direction of trend. I’ve left the Trend code in with strikes.
Note: 7. Abandoned Baby had two x TrendDown’s.
The Morning Star rules can be relaxed as I see in my code I included a more extreme LongCandle = Body > (RangeSize * 0.9) when I was testing it.
0.7 is fine.Another addition has been added (that I spotted from my Dropbox pdf link) : Three White Soldiers.
It has strong directional probabilities although performance isn’t always strong post pattern.. better for Scalpers.
(Note: In the Top Movers Screener there are Candlestick pattern and you can set the “Criteria” from “Completed” to “Current.” I can’t vouch for their accuracy in construction/coding or Bulkowski’s performance statistics).Bulkowski’s Candlestick Descriptions and Performance Statistics can be found on his site:
9 High Probability Bulkowski Candlestick Patterns123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356// 9 High Probability Bulkowski Candlestick Patterns//// The 9 most powerful classical Candlestick Patterns// Trend reversal and continuation patterns// Coded by Violet/Additions by Bard// 4-12-2017 /23/03/2019//// Based on the work of Thomas Bulkowski in his book: "Encyclopedia of Candlestick Charts", 2008// Read a summary here: https://www.investopedia.com/articles/active-trading/092315/5-most-powerful-candlestick-patterns.asp//// This *market-wide screener* works along similar lines as this *fund-specific indicator* in the PRC library list: "Candlestick patterns recognition"//text colorr = 255g = 51b = 51// DrawTextoffset1 = 50 * pipsizeoffset2 = offset1 * 6// Trend direction identification//(choose 0=No Trend check, 1=MACD, 2=SAR[default], 3=Directional Movement, 4=Moving Averagea crossing)//TDS=3//Trend Detection//if TDS=0 then//TrendUp=3//TrendDown=3//else//if TDS=1 then//TrendUp=(MACDline[12,26,9](close)>0 AND MACD[12,26,9](close)>0)//TrendDown=(MACDline[12,26,9](close)<0 AND MACD[12,26,9](close)<0)//else//if TDS=2 then//TrendUp=(SAR[0.02,0.02,0.2]<low)//TrendDown=(SAR[0.02,0.02,0.2]>high)//else//if TDS=3 then//TrendUp=(ADX[30]>25 AND DI[30](close)>0) //Default =[14] & >23//TrendDown=(ADX[30]>25 AND DI[30](close)<0)//else//if TDS=4 then//TrendUp=(Average[3](close)>Average[12](close))//TrendDown=(Average[3](close)<Average[12](close))//endif//endif//endif//endif//endif//// Signal codes and pattern types//**************************************************************************// Name of pattern Type Direction Accuracy rate Bulkowski's Occurrence//// ------- ------------ ------------ ----------// 1 = BearishThreeLineStrikeUp Bullish Reversal 84% Bull Mkt/77% Bear Mkt truly rare// 2 = BullishThreeLineStrikeDown Bearish Reversal 65% Bull Mkt/83% Bear Mkt truly rare// 3 = TwoBlackGappingDown Bearish Continuation 68% Bull Mkt/69% Bear Mkt common// 4 = ThreeBlackCrows Bearish Continuation 78% Bull Mkt/79% Bear Mkt abody// 5 = MorningStar Bullish Reversal 78% Bull Mkt/65% Bear Mkt very low// 6 = EveningStar Bearish Reversal 72% Bull Mkt/72% Bear Mkt very low// 7 = AbandonedBabyBull Bullish Reversal 70% Bull Mkt/55% Bear Mkt low// 8 = AbandonedBabyBear Bearish Reversal 69% Bull Mkt/52% Bear Mkt Bull Continuation low low// 9 = Three White Soldiers Bullish Reversal 82% Bull Mkt/84% Bear Mkt low//**************************************************************************//BearishThreeLineStrikeUp = 0 //(s)BullishThreeLineStrikeDown = 0 //(t)TwoBlackGappingDown = 0 //(b)ThreeBlackCrows = 0 //(c)MorningStar = 0 //(m)EveningStar = 0 //(e)AbandonedBabyBull = 0 //(d)AbandonedBabyBear = 0 //(a)ThreeWhiteSoldiers = 0 //(w)signal = 0//Best Probability in Bull Markets// 1 - (Three Bears then Up) Bearish Three Line Strike Up *************************************// Bulkowski accuracy rate 84% in Bull Mkt, 77% in a Bear Mkt, frequency: very rares1 = close[3] < open[3] // candle 4 = red candles2 = close[2] < open[2] and low[2] < low[3] and open[2] < open[3] // candle 3 = red candle, lower low & open than previous candles3 = close[1] < open[1] and low[1] < low[2] and open[1] < open[2] // candle 2 = red candle and lower low & open than previous candles4 = open[0] < low[1] and close[0] > open[3] // candle 1 = green candle, opens lower than previous candle and closes above open of 4th candle. The candle engulfs the bodies of the three preceding black candles//if s1 and s2 and s3 and s4 then //TrendDown[3] AND////BearishThreeLineStrikeUp = 1//endifif s1 and s2 and s3 and s4 then //TrendUp[3] ANDBearishThreeLineStrikeUp = 1endifif s1 and s2 and s3 and s4 then //TrendDown[3] ANDDRAWTEXT("Bearish Three Line Strike Up", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif//if s1 and s2 and s3 and s4 then //TrendUp[3] AND//DRAWTEXT("Bearish Three Line Strike Up", barindex, high, Dialog, Standard, 20) COLOURED(R,G,B)//DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)//endif// 5 Morning Star **************************************************// Bullish reversal of the downward price trend 78% of the (in a longer term up trend). 65% in a Bear Mkt. Size of price move better in downtrends if time limit of 10 days otherwise uptrends that are left to run are better. Ranked 6th for performance.//Bearish Pinbarbearishbody = ABS(open-close)bearishwick = ABS(high-close)//bearishnose = ABS(close-low)Body = abs(close - open) //definition of bodyRangeSize = average[50,0](range) //average of the range size of the last 50 candlesLongCandle = Body > (RangeSize * 0.9) //LongCandle is true if the size exceeds a percentage of the average RangeSizeLongCandle2 = Body > (RangeSize * 0.6) //LongCandle is true if the size exceeds a percentage of the average RangeSizem1 = close[2] < open[2] AND LongCandle // red candlem2 = open[1] < close[2] and close[1] < close[2] and low[1] < close[2] // candle entirely below predecessor’s bodym3 = close[0] > open[0] and open[0] > open[1] and low[0] < high[1] and LongCandle2 // green candle with a gapm4 = range[1] < (range[2] / 2 ) // morning star’s range is small compared to preceding candlem5 = bearishwick/bearishbody < 30/100 // Small Bullish Pinbar/No exhaustionif m1 and m2 and m3 and m4 and m5 then //TrendDown[3] ANDMorningStar = 1endif//if m1 and m2 and m3 and m4 and m5 then //TrendUp[3] AND//MorningStar = 1//endifif m1 and m2 and m3 and m4 and m5 then //TrendDown[3] ANDDRAWTEXT("Morning Star", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif//if m1 and m2 and m3 and m4 and m5 then //TrendUp[3] AND//DRAWTEXT("Morning Star", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)//DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)//endif// 7 - Abandoned baby, Bullish Reversal aka Morning Star but without the flatline of a doji ***********************// Bulkowski accuracy rate 70%, 55% in a Bear Mkt, frequency: lowd1 = close[2] < open[2] // red candled2 = open[1] < close[2] and close[1] < close[2] and high[1] < low[2] // candle entirely below predecessor's bodyd3 = close[0] > open[0] and low[0] > high[1] // green candle with a gapd4 = range[1] > (range[2] / 16 ) // morning star's range is small compared to preceding candle // Default (range[2] / 8 )if d1 and d2 and d3 and d4 then //TrendDown[3] ANDAbandonedBabyBull = 1endifif d1 and d2 and d3 and d4 then //TrendDown[3] ANDDRAWTEXT("Abandoned Baby Bull", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif//Best Probability in Bear Markets// 2 - (Three Bulls then Down) Bullish Three Line Strike Down *************************************// Bulkowski accuracy rate - bearish reversal 65% of the time in Bull and 83% in Bear, frequency: very raret1 = close[3] > open[3] // candle 4 = green candlet2 = close[2] > open[2] and high[2] > high[3] and open[2] > open[3] // candle 3 = green candle, higher low & open than previous candlet3 = close[1] > open[1] and high[1] > high[2] and open[1] > open[2] // candle 2 = green candle and higher low & open than previous candlet4 = open[0] > low[1] and close[0] < open[3] // candle 1 = red candle, opens higher than previous candle and closes below open of 4th candle. The candle engulfs the bodies of the three preceding green candles//if t1 and t2 and t3 and t4 then //TrendUp[3] AND//BullishThreeLineStrikeDown = 1//endifif t1 and t2 and t3 and t4 then //TrendDown[3] ANDBullishThreeLineStrikeDown = 1endifif t1 and t2 and t3 and t4 then //TrendUp[3] ANDDRAWTEXT("Bullish Three Line Strike Down", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif//if t1 and t2 and t3 and t4 then //TrendDown[3] AND////DRAWTEXT("Bullish Three Line Strike Down", barindex, high, Dialog, Standard, 20) COLOURED(R,G,B)//DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)//endif// 3 - Bearish Two Black Gapping *************************// Bulkowski accuracy rate 69% in Bear Mkt, 68% in Bull Mkt, frequency: commonb1 = close[1] < open[1] // red candleb2 = close[0] < open[0] // followed by another red candleb3 = high[0] < low[1] // with a down gap in between//if b1 and b2 and b3 then //TrendUp[3] AND//TwoBlackGappingDown = 1//endifif b1 and b2 and b3 then //TrendDown[3] ANDTwoBlackGappingDown = 1endif//if b1 and b2 and b3 then //TrendUp[3] AND//DRAWTEXT("Two Black Gapping Down", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)//DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)//endifif b1 and b2 and b3 then //TrendDown[3] ANDDRAWTEXT("Two Black Gapping Down", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// 4 - Three Black Crows *********************************// Bulkowski accuracy rate 78% in Bull Mkt, 79% Bear Mkt frequency: very commonc1 = close[2] < open[2]c2 = close[1] < open[1] and close[1] < low[2]c3 = close[0] < open[0] and close[0] < low[1]// Closing prices are less than 1/3 from lowsc4 = abs(close[2] -low[2]) < range[2] / 3c5 = abs(close[1] -low[1]) < range[1] / 3c6 = abs(close[0] -low[0]) < range[0] / 3if c1 and c2 and c3 and c4 and c5 and c6 thenThreeBlackCrows = 1 //TrendDown[3] ANDendif//if c1 and c2 and c3 and c4 and c5 and c6 then//ThreeBlackCrows = 1 //TrendUp[3] AND//endif//if c1 and c2 and c3 and c4 and c5 and c6 then//DRAWTEXT("Three Black Crows", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)//DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10) //TrendUp[3] AND//endifif c1 and c2 and c3 and c4 and c5 and c6 thenDRAWTEXT("Three Black Crows", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10) // TrendDown[3] ANDendif// 6 Evening Star **************************************************// Bulkowski accuracy rate 72% in Bull and 72% Bear Mkt, frequency lowe1 = close[2] > open[2] // green candlee2 = open[1] > close[2] and close[1] > close[2] and low[1] > close[2] // candle entirely above predecessor's bodye3 = close[0] < open[0] and high[0] < low[1] // red candle with a gape4 = range[1] < (range[2] / 2 ) // evening star's range is small compared to preceding candleif e1 and e2 and e3 and e4 then //TrendDown[3] ANDEveningStar = 1endif//if e1 and e2 and e3 and e4 then //TrendUp[3] AND//endif//if e1 and e2 and e3 and e4 then //TrendUp[3] AND//DRAWTEXT("Evening Star", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)//DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)//endifif e1 and e2 and e3 and e4 then //TrendDown[3] ANDDRAWTEXT("Evening Star", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// 8 - Abandoned baby, Bearish Reversal aka Evening Star but with the flatline of a doji. Trend doesn't last long ***********************// Bulkowski accuracy rate in Bull Mkt 69%, 52% in a Bear Mkt, frequency: lowa1 = close[2] > open[2] // green candlea2 = open[1] > close[2] and close[1] > close[2] and low[1] > high[2] // candle entirely above predecessor's bodya3 = close[0] < open[0] and low[1] > high[0] // red candle with a gapa4 = range[1] > (range[2] / 16 ) // range is small compared to preceding candle // Default (range[2] / 8 )if a1 and a2 and a3 and a4 then //TrendDown[3] ANDAbandonedBabyBear = 1endif//if a1 and a2 and a3 and a4 then //TrendUp[3] AND//DRAWTEXT("Abandoned Baby Bear", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)//DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)//endif// 9 - Three White Soldiers, Bullish Reversal. Price does not trend all that well after the breakout. Performance after formation not strong ***********************// Bulkowski accuracy rate in Bull Mkt 82%, 84% in a Bear Mkt, frequency: lowbody=close-openw1 = body[2]>0 and body[1]>0 and body>0w2 = high[1]>high[2] and high>high[1]w3 = close[1]>close[2] and close>close[1]w4 = open[1]>open[2] and open[1]<close[2] and open>open[1] and open<close[1]if w1 and w2 and w3 and w4 then //TrendDown[3] ANDThreeWhiteSoldiers = 1endifif w1 and w2 and w3 and w4 thenDRAWTEXT("Three White Soldiers", barindex,low-offset2, Dialog, Standard, 20) COLOURED(R,G,B)DRAWARROWUP(barindex,low-offset1) COLOURED(0,155,10)endif// Results ******************if BearishThreeLineStrikeUp thensignal = 1elsif BullishThreeLineStrikeDown thensignal = 2elsif TwoBlackGappingDown thensignal = 3elsif ThreeBlackCrows thensignal = 4elsif MorningStar thensignal = 5elsif EveningStar thensignal = 6elsif AbandonedBabyBull thensignal = 7elsif AbandonedBabyBear thensignal = 8elsif ThreeWhiteSoldiers thensignal = 9endif//// Pattern types//**************************//Type = Name of pattern//---- -------------------// 1 = BearishThreeLineStrikeUp// 2 = BullishThreeLineStrikeDown// 3 = TwoBlackGappingDown// 4 = ThreeBlackCrows// 5 = MorningStar// 6 = EveningStar// 7 = AbandonedBabyBull// 8 = AbandonedBabyBear// 9 = ThreeWhiteSoldiers//**************************//Return signal > 02 users thanked author for this post.
03/24/2019 at 10:14 AM #9454303/24/2019 at 10:07 PM #94569Cheers @GraHal, it needed to be done!
I’m still referring to those Dropbox pdf stats above and Bulkowski’s book so I may add some more Higher Probability Patterns later like the Bearish Engulfing (bottom of list) which is a Bearish Reversal 79% of the time in a Bull Market and 82% in a Bear.1 user thanked author for this post.
03/26/2019 at 9:33 PM #9474703/28/2019 at 7:58 PM #94923Hey, I forgot to add this. Bulkowski also says that “Most of the time, candles that showed the highest post breakout move began their life within the lowest third of the yearly price range. Here are the results.”. In his website he says that 84% of the reverse candles starting in the lowest third of the yearly price range are successful….food for thoughts.
03/29/2019 at 3:54 PM #95024Cheers, appreciated @Gabri, I was thinking along the same lines and making sure I had defined a Bull and Bear Market as per Bulkowski. I also added some moving averages codes and started on a “simple” indicator… lol.. but got stuck with the ALMA moving average programming (not a programmer) but that’s all fixed now thanks to help on this forum from Nicolas and Roberto:
Now another indicator to spot prices in a 1/3 of their yearly highs and lows would be handy too!
03/29/2019 at 6:00 PM #95052Now another indicator to spot prices in a 1/3 of their yearly highs and lows would be handy too!
Try this:
1234567891011121314151617181920212223242526272829303132startdate = opendate - 10000hh = 0ll = 100000000000if opendate[barindex] < startdate and not done thena = barindexdone = 1endifif done thenhh = highest[a](high)ll = lowest[a](low)lowlevel = ((hh - ll) / 3) + llhighlevel = hh - ((hh - ll) / 3)flag = 0if close < lowlevel thenflag = -1r = 128g = 0endifif close > highlevel thenflag = 1r = 0g = 128endifendifreturn flag coloured(r,g,0)style(histogram,2) as "Year Range Thirds"It counts how many bars are in a year by comparing today’s date to the first bar on a chart. Once a year has past it knows how many bars are in a year (so it can be used on any time frame). It then finds the highest high and the lowest low in that number of bars and so can then know what the top 1/3rd level is and the bottom 1/3rd level is.
Not fully tested and written in a hurry!
03/29/2019 at 9:59 PM #95062I first coded the indicator in my last post using for next loops and then while wend loops to get it to accurately only test the highs and lows in exactly the last year but it was incredibly slow to get a result. The version in the last post has the disadvantage that if the first year on a chart is a leap year then the number of bars it uses for all future years will be the number in a leap year but I felt it was accurate enough that the extra speed to calculate overcame the potential for inaccuracy.
1 user thanked author for this post.
03/29/2019 at 11:59 PM #95065Wow, nice going @Vonasi, thanks very much for coding that and thank you @Gabri.
Here is a Dow Chart that now shows another very interesting way of looking at the market. I’d been using Std Deviations, Linear Regression[60], R-Squared and ALMA 200 in blue and also Std Error Bands. But this gives a great indication of risk/returns and strength. I’ve also added the Bull/Bear ALMA indicator in the second image of the last 18 months of turbulence on the Dow. 👌👌
As great as all the ingenuity that goes into these excellent indicators on PRC, remember:
As hunter gatherers our survival depended upon traits that have become hard wired into our DNA. We seized opportunity (food) when it presented itself and as we also stood our ground in adversity.
Both those traits spell disaster for a trader!
Friday evening, philosophical Bard.
-
AuthorPosts
Find exclusive trading pro-tools on