Volume explosion detector
A 0 to 9 volume-surge score with no direction: most bars read 0, high readings mean volume is spiking.
The score adds points from four parts for the latest bar: volume against its baseline average over the last 20 bars by default (up to 4 when it is above 3 times that average), volume rising sharply bar to bar (up to 2), the last 5 price moves and volume changes pointing the same way (up to 2), and recent volume above 1.5 times the baseline (1). The total is a whole number from 0 to 9 and says nothing about whether price will rise or fall.
How to read it
- The score sits in its own pane below the price, always a whole number from 0 to 9.
- Most bars read 0. On the default SPY sample at least half scored 0, and the top 5% reached 6 or more.
- The chart shows only the total, not which part added the points, so check the volume bars behind a high score.
- The first 20 bars read 0 while the baseline fills.
What it outputs
- Explosion score
- Whole number from 0 to 9 summing volume spike (up to 4), volume acceleration (up to 2), price and volume agreement (up to 2) and short-term volume expansion (1).
Settings
- window_short
- Recent bars used for the acceleration average, the price and volume agreement count and the short-term volume average. Lower reacts within a few bars; higher smooths the readings. Keep it at or below window_long, or the short-term part never fires.
- window_long
- Bars in the volume baseline that spikes are measured against, and the warm-up before any score. Higher makes spikes rarer and slower to adapt; lower flags them sooner and more often. At 1, the spike and short-term parts never fire.
Pitfalls
- The score has no direction: its correlation with close was about zero (-0.01) on the SPY sample, so a high score does not mean price will rise or fall.
- The spike ratio divides by a baseline that already includes the current bar, so the top tier (above 3 times) needs about 3.4 times the average of the 19 prior bars.
- The price and volume part counts sign agreement, not correlation: bars where both fall subtract from it, and bars with opposite signs count zero, so it does not test whether volume sits on up moves.