Skip to main content
On this page

Chande Momentum Oscillator: Formula, Settings and Signal Tests

· 6 min read
Pineify Team
Pine Script and AI trading workflow research team

The Chande Momentum Oscillator (CMO) measures the balance of upward and downward price changes over a window. A positive reading means upward changes outweigh downward changes in that calculation. It does not establish that buyers will continue to dominate or that a reversal is more likely at a particular threshold.

Chande Momentum Oscillator Indicator - TradingView

Calculate the oscillator from changes, not counts​

For each bar, calculate the change in the selected source from its previous value. Let U be the sum of positive changes over the window, and D be the sum of the absolute sizes of negative changes. Then:

CMO = 100 × (U − D) / (U + D)

The denominator is total absolute movement, not the chart's high-low range or the number of up and down days. TradingView's CMO description provides the calculation and background.

For a hypothetical set of changes +2, -1, +3, -2, U is 5 and D is 3. CMO is therefore 25. If all nonzero changes in the window are upward, the result is 100; if all are downward, it is -100. A completely flat window has a zero denominator, so inspect the implementation's missing-value behavior rather than dividing by zero in a manual calculation.

Interpret thresholds without turning them into probabilities​

The familiar +50 and -50 reference levels describe strong directional imbalance. Algebraically, +50 corresponds to U being three times D when the denominator is positive; -50 reverses that relationship. They do not correspond to a 50% chance of a reversal.

Zero means U and D balance. A zero crossover and a return from an extreme are different events, and a strategy should not combine them under the vague instruction "buy when momentum improves." A high reading can persist during an advance; a low reading can persist during a decline.

A divergence compares selected price swings with oscillator swings. Specify how those swings are detected and when they become known. If the calculation needs bars to the right of a pivot, an entry cannot be assigned to the pivot's earlier date as though the confirmation were already available.

CMO and RSI share information​

Both indicators use gains and losses. The claim that RSI ignores one direction is incorrect. Standard Wilder-style RSI uses smoothed gains and losses, whereas the CMO formula above uses rolling sums. See TradingView's RSI calculation.

If an RSI-like calculation used simple averages of the same gains and losses over the same window, CMO would equal twice that RSI-like value minus 100. This is an algebraic relationship under those assumptions, not a claim that the standard smoothed RSI always matches CMO.

Consequently, CMO and RSI agreeing is not necessarily independent confirmation. Compare the complete rule with and without the second indicator to determine its effect on a particular test.

Configure the actual Pineify inputs​

Pineify's reviewed CMO library entry calls TradingView's ta.cmo. It exposes Source and Length, with close and 9 as the defaults, plus line styling. It does not include dedicated overbought/oversold threshold inputs inside that indicator configuration.

Pineify Website

Select the source and length, generate the script, then check compilation and closed-bar values in TradingView. If you need threshold conditions or alerts, define them explicitly in the relevant strategy or alert workflow rather than assuming a styled oscillator line provides them.

The Best Pine Script Generator

TradingView also offers a built-in CMO through its indicator library. Compare the source, window length and data history before expecting two versions to match. A different default is a configuration difference, not evidence that either implementation is more accurate.

Design one test at a time​

A candidate trend rule could enter after CMO crosses above zero and exit after it crosses below. A separate mean-reversion hypothesis could wait for a return above -50 after an oversold reading. Neither rule is recommended as profitable here.

For each experiment, specify:

  1. The exact event, including previous-bar and current-bar comparisons.
  2. Whether evaluation uses completed bars and when the order may fill.
  3. Position size, exits, maximum simultaneous exposure and treatment of opposite signals.
  4. Commissions, spread, slippage and any financing assumptions.
  5. Development and evaluation dates, with a record of every parameter set tried.

Longer windows change responsiveness but do not guarantee higher reliability. Wider thresholds can reduce the number of qualifying events without necessarily increasing the win rate. Compare sample size, net results and drawdown alongside the rate of winning trades.

Pineify helps build Pine Script rules; TradingView's strategy engine simulates their orders. Historical drawdown and scenario analysis are not a bound on future losses. An oscillator itself is not a backtest, and a generated script needs its own validation.

Check realtime behavior​

On a developing bar, changes to the source can alter CMO and its threshold crossings. TradingView's repainting guide describes the difference between historical and realtime calculations. Match alert frequency to the intended strategy timing and retain the actual alert log rather than reconstructing all signals from a finished chart.

Frequently asked questions​

Does CMO divide by the trading range?

No. Its denominator is the sum of positive changes plus the absolute sum of negative changes over the calculation window. It is not high minus low.

What are the best day-trading settings?

No comparative test establishes a universal best length or threshold here. The reviewed Pineify default length is 9. Treat that as a configuration to evaluate, not a performance recommendation.

Is CMO less prone to false signals than RSI?

That requires a defined signal, outcome, market and dataset. The formulas differ, but their mathematical definitions alone do not establish comparative trading performance.

Does crossing minus 50 mean I should buy?

It describes a threshold event. A complete strategy must define the direction of the cross, order timing, position size and exit, then evaluate the resulting trades and costs.