1 unstable release
0.1.0 | Dec 18, 2020 |
---|
#10 in #oscillator
8KB
111 lines
Klinger Volume Oscillator (KVO)
use kvo::KVO;
use ta_common::traits::Indicator;
let mut kvo = KVO::new(2, 5);
assert_eq!(kvo.next([82.15, 81.29, 81.59, 5_653_100.00]), None);
assert_eq!(kvo.next([81.89, 80.64, 81.06, 6_447_400.00]), Some(-175190015.79778826));
assert_eq!(kvo.next([83.03, 81.31, 82.87, 7_690_900.00]), Some(215794051.62738508));
assert_eq!(kvo.next([83.30, 82.65, 83.00, 3_831_400.00]), Some(248493877.05267042));
assert_eq!(kvo.next([83.85, 83.07, 83.61, 4_455_100.00]), Some(235332365.7752409));
assert_eq!(kvo.next([83.90, 83.11, 83.15, 3_798_000.00]), Some(-190037611.21375185));
assert_eq!(kvo.next([83.33, 82.49, 82.84, 3_936_200.00]), Some(-287489826.79249376));
assert_eq!(kvo.next([84.30, 82.30, 83.99, 4_732_000.00]), Some(18997560.599353276));
assert_eq!(kvo.next([84.84, 84.15, 84.55, 4_841_300.00]), Some(249242717.81561512));
assert_eq!(kvo.next([85.00, 84.11, 84.36, 3_915_300.00]), Some(-128634280.44669077));
assert_eq!(kvo.next([85.90, 84.03, 85.53, 6_830_800.00]), Some(76813896.24615139));
assert_eq!(kvo.next([86.58, 85.39, 86.54, 6_694_100.00]), Some(270380021.79762703));
assert_eq!(kvo.next([86.98, 85.76, 86.89, 5_293_600.00]), Some(211112721.2870996));
assert_eq!(kvo.next([88.00, 87.17, 87.77, 7_985_800.00]), Some(340139231.8525958));
assert_eq!(kvo.next([87.87, 87.01, 87.29, 4_807_900.00]), Some(-322932972.7463783));
Dependencies
~10KB