Return the value of “Chande Momentum Oscillator” technical indicator.
pos positive variation, pos = 0 if variation is negative
neg negative variation, pos = 0 if variation is positive
variation = pos – neg
We calculate Mpos and Mneg the moving average with p days of pos and neg.
Chande momentum oscillator = (Mpos – Mneg) / (Mpos + Mneg) * 100
This indicator is similar to the RSI indicator.
Buy signals occur generally when crossing the -50 level and sell signals when crossing the +50 level.
Chande is always scaled between -100 and 100 (bounded indicator).
It can also give good divergence signals.
A bullish divergence occurs when the stock price makes new lows while the chande fails to make new lows.
A bearish divergence occurs when the stock price makes new highs while the chande fails to make new highs.
We can apply a moving average on this indicator to smooth it.
Chandle1 = Chandle(High)
Chandle2 = Chandle(Low)
Result = (Chandle1 + Chandle2) /2
RETURN Result AS "Average Chandle"