kestrel-chartkitv0.33.0

← All examples

dmi

Directional Movement Index

dmi

examples/site_showcase.rs
// Directional Movement Index (+DI / -DI)
// Defaults of "dmi" (see the indicator reference)
let params = HashMap::from([
    ("period".to_string(), 14.0),
]);
let mut indicator = build_checked("dmi", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Directional Movement Index (+DI / -DI). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 119 alerts in view, the latest as markers.Directional Movement Index (+DI / -DI). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 119 alerts in view, the latest as markers.
  • Volatility and trend strength
  • unit: Ratio