Docs

ta.cmo

Measure momentum from the balance of up and down moves, on a -100 to 100 scale.

itm
ta.cmo(source, length)

Chande Momentum Oscillator: 100 * (sum of upward changes - sum of downward changes) / (sum of both), over the last length one-bar changes. These are plain rolling sums, not Wilder smoothing, which is what separates it from ta.rsi. Bounded to [-100, 100].

Parameters

A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.

NameKindTypeDefaultRangeDescription
sourceSeriesnumber--The series to read.
lengthConstantnumber91 to 10000Window in observed bars.

Output

NameType
valuenumber

Warm-up and missing values

Warm-up
length + 1 bars. Names in the warm-up are this operator’s parameters.
Missing values
Returns na until length consecutive one-bar changes are in the window (so length + 1 observations). An na resets the accumulation. na when the window has no movement at all, up or down, because the index is 0/0 there.

Example

itm
ta.cmo(close, 9)
itm
plot(ta.cmo(close, 9), "Momentum oscillator 9")