kestrel-chartkitv0.33.0

← All examples

money_flow_profile

Volume-by-price profile binned by dollar volume

money_flow_profile

examples/site_showcase.rs
// Volume-by-price profile binned by dollar volume (volume x price) instead of raw volume, plus an aggregate bull/bear flow-bias percentage
// Defaults of "money_flow_profile" (see the indicator reference)
let params = HashMap::from([
    ("lookback".to_string(), 200.0),
    ("rows".to_string(), 25.0),
    ("va_pct".to_string(), 0.7),
]);
let mut indicator = build_checked("money_flow_profile", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Volume-by-price profile binned by dollar volume (volume x price) instead of raw volume, plus an aggregate bull/bear flow-bias percentage. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 13 alerts in view, the latest as markers.Volume-by-price profile binned by dollar volume (volume x price) instead of raw volume, plus an aggregate bull/bear flow-bias percentage. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 13 alerts in view, the latest as markers.
  • Volume
  • unit: Price