Chande Momentum Oscillator (CMO)
use cmo_rs::CMO;
use ta_common::traits::Indicator;
let mut cmo = CMO::new(5);
assert_eq!(cmo.next(81.59), None);
assert_eq!(cmo.next(81.06), None);
assert_eq!(cmo.next(82.87), None);
assert_eq!(cmo.next(83.00), None);
assert_eq!(cmo.next(83.61), Some(79.77099236641216));
assert_eq!(cmo.next(83.15), Some(84.4117647058823));
assert_eq!(cmo.next(82.84), Some(100.0));
assert_eq!(cmo.next(83.99), Some(100.0));
assert_eq!(cmo.next(84.55), Some(100.0));
assert_eq!(cmo.next(84.36), Some(100.0));
assert_eq!(cmo.next(85.53), Some(100.0));
assert_eq!(cmo.next(86.54), Some(100.0));
assert_eq!(cmo.next(86.89), Some(100.0));
assert_eq!(cmo.next(87.77), Some(100.0));
assert_eq!(cmo.next(87.29), Some(100.0));