Momentum phase
Momentum phase from 0 (retracement) to 3 (explosion); on this chart's wiring it reads 2 on every bar.
Each bar gets a phase label from five inputs: two rate-of-change readings (roc_fast, roc_slow), a volume momentum (obv_momentum), the close and an EMA (ema_fast). It labels a bar 3 when both rate-of-change readings are strong, volume momentum is positive and the close is above the EMA; 2 when both are modestly positive with positive volume momentum; 0 when either is negative; and 1 otherwise. The output is the highest label over the last three bars.
How to read it
- The line sits in its own pane below the price and is meant to take whole values from 0 to 3.
- On this chart it is a flat line at 2 across all 20,160 sampled SPY bars, so it says nothing about the price.
- The cause is the wiring: all five inputs get the close price, so the rate-of-change and volume inputs are price levels, and the EMA equals the close, which keeps explosion (3) from ever firing.
- A real reading needs a strategy that feeds rate-of-change, OBV momentum and EMA indicators into these inputs; this chart does not.
What it outputs
- Momentum phase
- Phase 0 retracement, 1 consolidation, 2 acceleration, 3 explosion: the highest label over the last three bars. Flat at 2 on this chart.
Pitfalls
- Broken on this chart: the flat 2 comes from the input wiring, not from the market, so it carries no momentum information here.
- The output holds the highest label of the last three bars, so an explosion (3) stays visible two bars longer and a retracement (0) is hidden for up to two bars after a 2 or 3.
- On a bar where an input is missing it returns 1 (consolidation) and skips the history, so a data gap reads as calm rather than blank.