Piercing pattern
Marks a two-candle bullish bounce: a red candle, then a green one that opens lower and closes above its midpoint.
The indicator looks at the last two one-minute candles and returns true or false on every bar. It needs the earlier candle to be bearish (close below open), the current candle to be bullish (close above open), the current open to sit below the earlier close, and the current close to sit above the midpoint of the earlier candle's body. Nothing is smoothed or scaled, so each bar gets a plain yes or no.
How to read it
- Markers sit on the second candle of the pattern, the green one, not on the red candle before it.
- A marker means the earlier bar fell, then this bar opened lower and closed back above the middle of that red body.
- Treat a marker as a short-term bounce hint on the minute chart, and check the broader trend before acting on it.
What it outputs
- Piercing pattern
- Marks the bar where a two-candle bullish reversal completes. It is true or false on each bar and drawn only where it fires.
When it fires
On the second candle, when all four conditions hold on the same bar. It means the earlier red bar's selling was reversed within one more minute, with the bounce closing above half that bar's body. This is a hint of a short bounce, not a confirmed turn.
Pitfalls
- The docstring says the open must be below the prior low, but the code tests the prior close, which is the bottom of its body. That makes it fire more often than the textbook pattern.
- It fires on about 3% of one-minute bars, roughly 31 a day in the sample, so single markers are mostly noise. Pair it with a trend or level filter.
- It looks only at the last two bars with no volume or size check, so a marker says nothing about how far price moves after it.