Explosive pullback
Flags a dip below the recent high while price is not falling fast and volume is calm; never fired at defaults on SPY.
ExplosivePullback is a true or false flag, not a score. A bar is flagged only when three tests pass together. The close must sit at least pullback_threshold below the highest high of the last 10 bars. The average one-bar return over momentum_window bars must stay above -0.1%, so price is not falling fast. When volume_confirmation is on, the bar's volume must be under 1.2 times the 10-bar average volume.
How to read it
- Markers sit on the candles where the flag is on. Nothing is drawn as a line.
- A marker needs all three tests at once: a dip from the 10-bar high, a price that is not falling fast, and a calm volume bar.
- At defaults the chart stays empty: the flag never fired on about 20,000 one-minute SPY bars from September 2026.
What it outputs
- Pullback flag
- On for candles where the close is a set distance below the recent high, the average move is not steeply down, and volume is not spiking.
When it fires
On the bar where the dip, the not-falling-fast test and the volume test all pass together. It marks a candidate dip to inspect, not a confirmed reversal, and it gives no entry, stop or target. It did not fire on the SPY sample at defaults.
Settings
- pullback_threshold
- Minimum fall below the highest high of the last 10 bars, as a fraction (0.02 = 2%). Raising it keeps only deeper dips, so markers get rarer. Lowering it admits shallow dips, so markers get more frequent. Negative values also pass at new highs.
- momentum_window
- Bars averaged for the reversal test. Shorter reacts to the last few bars, so a single sharp drop can block markers. Longer dilutes a single drop in the average, so markers pass more often.
- volume_confirmation
- On (1) blocks markers when the bar's volume is 1.2 times or more the recent 10-bar average, filtering volume spikes. Off (0) skips that test, so spike bars can be flagged too.
Pitfalls
- At defaults it never fired on about 20,000 one-minute SPY bars, so an empty chart is the expected result, not a bug.
- The docstring says it looks for oversold momentum and volume drying up. The code checks neither: the volume test only blocks spikes, and no oversold indicator is computed.
- The reversal test is loose. It passes while the average one-bar return stays above -0.1%, so price can still be falling and pass. The 10-bar high lookback is fixed in the code, not a parameter.