Momentum surge detector
Blends momentum, acceleration, trend and volume into a 0 to 3 score; on SPY one-minute bars it sat between 1.7 and 2.2.
It adds four weighted parts: momentum from the sizes of the 1, 3, 5 and 10-bar rate-of-change inputs (up to 1.2), acceleration (0.8 when the 1-bar reading beats the 3-bar and that beats the 5-bar, 0.4 when only the first pair does), ADX trend strength (up to 0.6), and volume above a 1.2 ratio (up to 0.4). The parts add to a score from 0 to 3.0, so the docstring's 3.0+ claim is wrong. Momentum uses absolute size, so direction enters only through acceleration, and the score is blank when any input is blank (0.13% of sample bars).
How to read it
- The score sits in its own pane below the price. Read it against the band it usually occupies, not its absolute value.
- On SPY one-minute bars most readings fall between about 1.8 and 2.2 (the shaded zone; median 1.98), and 2.2 was the highest reading in the sample.
- A move up through the band means more of the four parts are firing together, though the one-month sample never went above 2.2.
- Direction is not shown: a rally and a sell-off can both lift the score, so check the candles for which it was.
What it outputs
- Surge score
- Weighted sum of momentum, ROC acceleration, ADX trend and volume ratio, capped at 0 to 3.0. On SPY one-minute bars it read 1.7 to 2.2 in the sample.
Pitfalls
- Direction is mostly lost: momentum uses absolute ROC, and acceleration pays when the short ROC sits above the longer ones, so an easing sell-off scores as high as a rally.
- Little range in the sample: it sat between 1.71 and 2.2, so the docstring's 2.5 explosive and 1.0 weak levels were not reached. Read changes against the recent band.
- The cut-offs are fixed numbers (ROC 0.015 to 0.035, ADX 35, volume 1.2 to 3.0), so if the ROC or volume inputs use different units, one part saturates or vanishes and the score changes meaning.