kestrel-chartkitv0.33.0

← All examples

vidya

Variable Index Dynamic Average

vidya

examples/site_showcase.rs
// Variable Index Dynamic Average (CMO-scaled exponential smoothing)
// Defaults of "vidya" (see the indicator reference)
let params = HashMap::from([
    ("cmo_len".to_string(), 9.0),
    ("ema_len".to_string(), 12.0),
]);
let mut indicator = build_checked("vidya", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Variable Index Dynamic Average (CMO-scaled exponential smoothing). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 0 alerts in view, the latest as markers.Variable Index Dynamic Average (CMO-scaled exponential smoothing). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 0 alerts in view, the latest as markers.
  • Moving averages, bands and trend lines
  • unit: Price