kestrel-chartkitv0.33.0

← All examples

cmf

Chaikin Money Flow

cmf

examples/site_showcase.rs
// Chaikin Money Flow
// Defaults of "cmf" (see the indicator reference)
let params = HashMap::from([
    ("period".to_string(), 20.0),
]);
let mut indicator = build_checked("cmf", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Chaikin Money Flow. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 55 alerts in view, the latest as markers.Chaikin Money Flow. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 55 alerts in view, the latest as markers.
  • Volume
  • unit: Ratio