The Chande Momentum Oscillator (CMO) is a momentum indicator that measures the difference between the sum of recent gains and losses over a specified period.
CMO = 100 × (Sum of Gains − Sum of Losses) / (Sum of Gains + Sum of Losses)
- Gains: sum of positive changes over period
- Losses: sum of absolute value of negative changes over period
period(default: 14): Period for calculation
import { CMO } from '../src/cmo';
const cmo = new CMO();
const result = cmo.nextValue(close);
// result: CMO valueA single number: the CMO value for the current input.