Momentum wave
Scores a run of rising short-term momentum from 0 to 5, with volume confirming the strongest levels.
MomentumWave counts consecutive bars where the short rate-of-change (ROC) is above 0.5% and the mid ROC is above zero. After two such bars in a row it scores the run from 1 to 5, rising with the average of the last three short-ROC readings and with volume above its recent average. The long ROC must be wired in, but it never changes the score.
How to read it
- The line sits in its own pane below the price and only takes whole values from 0 to 5.
- 0 means no wave. 1 means the run has just started, with too little history to judge it. 2 means a run with no size or volume confirmation.
- 3 means the mid ROC is above 0.5%. 4 and 5 need the recent short ROC to average above 1% or 1.5%, with volume above 1.2x or 1.3x its average.
- The score drops to 0 on the first bar where the short ROC or mid ROC fails, so a run that stutters shows up as a jagged line.
What it outputs
- Wave strength
- Momentum wave strength from 0 (no wave) to 5 (strongest), a whole number that steps up and down bar by bar.
Pitfalls
- On the September 2026 SPY one-minute sample it reads 5 on at least half of bars (median 5, 5th percentile 3), so the top levels are not rare. Check the ROC and volume-ratio input wiring first.
- roc_long is required but unused: the code only checks it for None, so a missing long ROC blanks the value while a different long ROC changes nothing.
- The code comment says it checks acceleration, but it averages the level of the last three short-ROC readings. A rising average is not the same as a rising rate of change.