Explosive volume surge
Volume surge score from 0 to 3, counted only on bars where momentum is positive.
The indicator takes a volume series, a short and a long volume average, and a momentum series as inputs. It divides the bar's volume by each average and keeps the larger ratio. It scores 0 when momentum is at or below its threshold, and otherwise scores 3, 2 or 1 as that ratio clears the high, mid or low threshold.
How to read it
- The line sits in its own pane below the price and takes only the whole values 0, 1, 2 or 3.
- A 3 means volume reached the high multiple of its averages while momentum was positive; 2 and 1 are the mid and low tiers.
- A 0 means either no surge or momentum that did not pass, and the line does not show which.
- On the SPY test set the line sat at 3 for at least half the bars, so it reads as busy rather than rare.
What it outputs
- Surge score
- Whole-number score from 0 (no surge or no momentum) to 3 (extreme volume surge with momentum).
Settings
- surge_threshold_high
- Volume multiple of its averages (the larger ratio of the two) that earns a 3 while momentum is positive. Raising it makes 3 rare; lowering it lets ordinary volume bars reach 3.
- surge_threshold_mid
- Volume multiple that earns a 2 while momentum is positive. Raising it pushes bars that would score 2 down to 1 or 0; lowering it lets moderate volume score 2.
- surge_threshold_low
- Volume multiple that earns a 1 while momentum is positive, the lowest surge tier. Raising it leaves more bars at 0; lowering it marks small volume bumps as surges.
- momentum_threshold
- Momentum input that must be above this for any score above 0. Raising it blocks more bars to 0; lowering it, even below zero, lets bars with falling momentum score.
Pitfalls
- On SPY one-minute bars the score sat at 3 for at least half the bars, which real spikes should not do. The facts run does not show how the inputs were wired, so check them before trusting the line.
- Momentum gates everything: a bar with a large volume spike but momentum just below the threshold scores 0, the same as a quiet bar.
- A bar with a missing input or a zero or negative average has no value, shown as None in Python and NaN in the native version, so the line can gap.