Volume explosion
Volume spike strength on each bar; 0 on most bars, so only real volume surges show.
For each one-minute bar, the indicator compares that bar's volume with the average and sample standard deviation of volume over the last long_window bars, the current bar included. A bar scores only when its volume is above threshold times that average and more than 1.5 standard deviations above it; the 1.5 cutoff is fixed in the code. The score is (volume ÷ average − threshold) × z-score, and every other bar is 0. The short_window average is computed but never used in the score.
How to read it
- The line sits in its own pane below the price, with no units: bigger numbers mean a bigger spike over the recent norm.
- Most bars read 0. At default settings the top 5% of bars reach about 3.4, and the largest bar in a month of SPY reached about 145.
- The indicator ignores price direction. A large value on a down-close is still a volume spike, so read it against the candle.
What it outputs
- Volume spike
- Spike strength on this bar: 0 for normal volume, otherwise (volume ratio minus threshold) times the z-score. Never negative.
Settings
- short_window
- No effect on the values. The short average is computed but never used in the score; set above long_window, it only delays the first scored bar. At the default of 5 it changes nothing visible.
- long_window
- How many recent bars form the baseline average and spread, current bar included. Short (about 10) lets a burst lift its own baseline, so scores stay low. Long (120 or more) moves the baseline slowly, so one bar moves it less and isolated surges score higher.
- threshold
- Volume multiple of the average a bar must exceed to score. It is also subtracted from the ratio, so raising it (3 or more) lowers every score. Near 1 lets above-average volume through; negative values pass every bar, leaving only the z-score test.
Pitfalls
- The current bar is part of its own baseline, so a very large bar lifts the average and spread it is judged against, which lowers its score. Longer windows dilute this.
- The 1.5 standard deviation cutoff is hard-coded and does not move with threshold, so even looser settings still need a 1.5 sigma spike.
- short_window looks like a sensitivity control but changes no value; it is computed and then unused in the score.