How it is calculated
Over the last length changes of the source, up is the sum of the rises and down the sum of the falls. CMO is 100 times (up minus down) divided by (up plus down), and 0 when nothing moved. This is Chande's original form with plain sums (Chande and Kroll 1994): no smoothing, and a change drops out after length bars. TA-Lib's CMO is not this one: it smooths the moves the Wilder way, as RSI does, which makes it 2 times RSI minus 100.
Reference: Chande and Kroll 1994, The New Technical Trader
How to read it
Above 50 the rises clearly outweigh the falls, below -50 the reverse; Chande read these as overbought and oversold. Zero means balance. With plain sums it reacts at once to a large change and again when that change leaves the window, so it is jumpier than RSI. Divergences with price hint at a fading move.
In a strategy
A mean reversion entry when CMO rises back above -50: ctx.ind("cmo", length=9) compared with its value a bar earlier, or a trend filter that allows longs only while it is above zero.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Lengthlength | Whole number | 9 | min 1, max 5000 |
Sourcesource | Price | "close" | close, open, high, low, hl2, hlc3, ohlc4, hlcc4 |
What it draws
| Line | Drawn as |
|---|---|
| CMO | Line |
Moves between -100 and 100. Guide lines at -50, 50.
Used in
No strategy template reads it yet.