The Chande Momentum Oscillator (CMO), developed by Tushar Chande, is a pure momentum indicator that measures the direction and strength of a trend. Unlike other oscillators like the RSI which can become "compressed" at their extremes, the CMO uses a distinct calculation that allows it to oscillate freely between -100 and +100.
All core calculation logic is encapsulated within a dedicated and reusable include file.
* **Composition:** The calculator internally uses our universal `MovingAverage_Engine.mqh` to handle the smoothing of the Signal Line. This allows for advanced smoothing types (like DEMA or TEMA) beyond the standard SMA.
* **Optimized Incremental Calculation (O(1)):**
Unlike basic implementations that recalculate the entire history on every tick, this indicator employs an intelligent incremental algorithm.
* **State Tracking:** It utilizes `prev_calculated` to process only new bars.
* **Persistent Buffers:** Internal buffers persist their state between ticks.
* **Robust Offset Handling:** The engine correctly handles the initialization periods of the chained calculations.
* A derived class, `CCMOCalculator_HA`, inherits all the logic and only overrides the `PreparePriceSeries` method to supply Heikin Ashi data as the input.
* **CMO > +50:** The market is considered overbought.
* **CMO < -50:** The market is considered oversold.
* **Bollinger Bands:** When the CMO touches or exceeds its own Bollinger Bands, it signals an extreme statistical deviation in momentum, often preceding a reversal.