indicator · own pane · open source

Chande Momentum

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Chande Momentum Oscillator (CMO) is the difference between sum of ups and sum of downs over the lookback, scaled to ±100. A symmetric, range-bounded momentum oscillator.

  • Above +50 = overbought, below -50 = oversold.
  • Zero-line crosses flag momentum shifts.
  • Raise Length for fewer, steadier signals.

Source code

//@version=5
indicator("Chande Momentum", overlay=false)
len = input.int(14, "Length", minval=2, maxval=200)
src = input.source("close", "Source")
chg = ta.change(src)
sumUp = math.sum(chg > 0 ? chg : 0.0, len)
sumDn = math.sum(chg < 0 ? -chg : 0.0, len)
cmo = 100.0 * (sumUp - sumDn) / (sumUp + sumDn)
hline(50, "Overbought", color=color.gray, linestyle=hline.style_dashed)
hline(-50, "Oversold", color=color.gray, linestyle=hline.style_dashed)
hline(0, "Zero", color=color.gray, linestyle=hline.style_dotted)
p_CMO = plot(cmo, "CMO", color=color.aqua, linewidth=2)
alertcondition(ta.crossover(cmo, 0), "CMO crosses zero up", "Chande Momentum turned positive")
alertcondition(ta.crossunder(cmo, 0), "CMO crosses zero down", "Chande Momentum turned negative")

Comments

No comments yet.

Sign in to comment.