Five Candlestick Patterns : The 5 most powerful classical Candlestick Patterns
Trend reversal and continuation patterns 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”
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
// Five Candlestick Patterns // // The 5 most powerful classical Candlestick Patterns // Trend reversal and continuation patterns // Coded by Violet // 4-12-2017 // // 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" // // Signal codes and pattern types //************************************************************************** // Type Direction Bulkowski's Occurrence // Name of pattern accuracy rate // ------- ------------ ------------ ---------- // 1 = ThreeLineStrikeUp Bullish Reversal 84% truly rare // 2 = TwoBlackGappingDown Bearish Continuation 68% common // 3 = ThreeBlackCrows Bearish Continuation 78% common // 4 = EveningStar Bearish Reversal 72% very low // 5 = AbandonedBaby Bullish Reversal 70% low //************************************************************************** // ThreeLineStrikeUp = 0 TwoBlackGappingDown = 0 ThreeBlackCrows = 0 EveningStar = 0 AbandonedBaby = 0 signal = 0 // 1 - Three Line Strike Up ************************************* // Bulkowski accuracy rate 84%, frequency: very rare t1 = close[3] < open[3] // candle 4 = red candle t2 = close[2] < open[2] and low[2] < low[3] and open[2] < open[3] // candle 3 = red candle, lower low & open than previous candle t3 = close[1] < open[1] and low[1] < low[2] and open[1] < open[2] // candle 2 = red candle and lower low & open than previous candle t4 = 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 t1 and t2 and t3 and t4 then ThreeLineStrikeUp = 1 endif // 2 - Bearish Two Black Gapping ************************* // Bulkowski accuracy rate 68%, frequency: common b1 = close[1] < open[1] // red candle b2 = close[0] < open[0] // followed by another red candle b3 = high[0] < low[1] // with a down gap in between if b1 and b2 and b3 then TwoBlackGappingDown = 1 endif // 3 - Three Black Crows ********************************* // Bulkowski accuracy rate 78%, frequency: very common c1 = 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 lows c4 = abs(close[2] -low[2]) < range[2] / 3 c5 = abs(close[1] -low[1]) < range[1] / 3 c6 = abs(close[0] -low[0]) < range[0] / 3 if c1 and c2 and c3 and c4 and c5 and c6 then ThreeBlackCrows = 1 endif // 4 Evening Star ************************************************** // Bulkowski accuracy rate 72%, frequency low e1 = close[2] > open[2] // green candle e2 = open[1] > close[2] and close[1] > close[2] and low[1] > close[2] // candle entirely above predecessor's body e3 = close[0] < open[0] and high[0] < low[1] // red candle with a gap e4 = range[1] < (range[2] / 2 ) // evening star's range is small compared to preceding candle if e1 and e2 and e3 and e4 then EveningStar = 1 endif // 5 - Abandoned baby, aka Morning star *********************** // Bulkowski accuracy rate 70%, frequenc": low a1 = high[1] < low[2] // gap a2 = high[1] < low[0] // gap a3 = abs(open[1]-close[1]) < ( range[1] / 2 ) // doji like if a1 and a2 and a3 then AbandonedBaby = 1 endif // Results ****************** if ThreeLineStrikeUp then signal = 1 elsif TwoBlackGappingDown then signal = 2 elsif ThreeBlackCrows then signal = 3 elsif EveningStar then signal = 4 elsif AbandonedBaby then signal = 5 endif // // Pattern types //************************** //Type = Name of pattern //---- ------------------- // 1 = ThreeLineStrikeUp // 2 = TwoBlackGappingDown // 3 = ThreeBlackCrows // 4 = EveningStar // 5 = AbandonedBaby //************************** // screener [ signal > 0 ] sort by signal as "Type" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi Violet, Thanks so much for making this screener. Bulkowski’s work is thorough.
I thought it might be useful to add the Bullish Three Line Strike (Down) to the list.
ps/ @nicolas, I added the complete code twice here using the “Add PRT Code” but it won’t show on this page/here in this edit field. I’m using Safari browser (latest Mac/latest s/ware)? Link button dead too.. cheers.
The code is here in my Dropbox: (look for the rtfd / TXT file)
https://www.dropbox.com/sh/e66o3os7flkty4v/AABgbgZexNb6W-iz9-qrLfXRa?dl=0