Lipi Reference
Lipi

Functions

talib.cmo()

Chande Momentum Oscillator for `source` over `length` bars. Two arguments in, one series float out — the same call shape as `talib.rsi`.

Syntax

                talib.cmo(series float source, series int length) → series float
              

Arguments

source required series float Series of values to process.
length required series int Number of bars (length).

Return Type

series float

Example


          //@lipi=2
indicator("Chande Momentum Oscillator (CMO)", overlay=false)
// User input
length = input(14, title="CMO Length")
// Calculate CMO
cmoValue = talib.cmo(close, length)
// Plot CMO
plot(cmoValue, title="CMO", color=color.blue, linewidth=2)
// Overbought/Oversold Levels
hline(50, "Overbought", color=color.green)
hline(0, "Neutral", color=color.gray)
hline(-50, "Oversold", color=color.red)