OPEN-SOURCE SCRIPT

Reversal Candlestick Pattern Detector

Updated
// Name: Reversal Candlestick Pattern Detector
// Condition:
// 1-up move: last n candles, 3/5 move higher; and/or the last is the highest in past n bars
// 2-down move: last n candles, 3/5 move lower; and/or the last is the lowest in past n bars
//
// Show Bullish reversal pattern in down move; Show Bearish reversal pattern in up move;
//
//Reversal candlestick patterns:
//1. Hammer/Shooting Star,
//2. Engulfing,
//3. Morning/Evening Star,
//4. Harami, --Also Harami could be used in continuation (Rally based Rally/Drop based Drop);
//5. Piercing/Dark Cloud cover,
//6. Hook Reversal
//7. Breakaway Gap, or Gap Crosses SMA8, SMA50. This is for un-filled Gap only. low[1]>high or high[1]<Low
Release Notes
Show Morning Star and Evening Star flag on the star candle. I learned how to use "offset in plotshape()" today.
candlestickpatternTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer