Here is a simple screener to find both Evening Star and Morning Star candlestick patterns.
The screener returns a signal named “Go”, which can be:
1 = Go long (Morning Star found)
-1 = Go Short (Evening Star found)
A variable named “BaseCandle” represents the first pattern candle from the right, so a search for past patterns can be done.
To the known 3 candles pattern, I added one more black candle to the Morning Star to check previous trend. In the same way, to the Evening Star I added one more white candle.
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 |
//Author: Francesco //Date: 20-01-2017 //BaseCandle parameter = first candle of the pattern, starting from right (it is possible to run screener staring from any past candle) BaseCandle = 0 Open0 = Open[BaseCandle] Close0 = Close[BaseCandle] Open1 = Open[BaseCandle + 1] Close1 = Close[BaseCandle + 1] Open2 = Open[BaseCandle + 2] Close2 = Close[BaseCandle + 2] Open3 = Open[BaseCandle + 3] Close3 = Close[BaseCandle + 3] //Evening Star EvStar = Open0 > Close0 And Open0 < Close1 And Open1 > Close1 And Close1 > Close2 And Open2 < Close2 And Close2 > Close3 And Open3 < Close3 //Morning Star MornStar = Open0 < Close0 And Open0 > Close1 And Open1 < Close1 And Close1 < Close2 And Open2 > Close2 And Close2 < Close3 And Open3 > Close3 //Go Short Signal = -1 If EvStar then Go = -1 endif //Go Long Signal = 1 If MornStar then Go = 1 endif Condition = (EvStar Or MornStar) SCREENER[Condition] (Go AS "Go") |
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
Nice screener but the 2 candelsticks around the doji should be long sticks (red and green). Furthermore, there should ideally be a gap between the 2 long candelsticks and the doji.