kestrel-chartkitv0.33.0

← All examples

volume_profile

Price/volume distribution profile with point-of-control

volume_profile

examples/site_showcase.rs
// Price/volume distribution profile with point-of-control
// Defaults of "volume_profile" (see the indicator reference)
let params = HashMap::from([
    ("lookback".to_string(), 70.0),
    ("num_bins".to_string(), 30.0),
]);
let mut indicator = build_checked("volume_profile", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Price/volume distribution profile with point-of-control. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 66 alerts in view, the latest as markers.Price/volume distribution profile with point-of-control. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 66 alerts in view, the latest as markers.
  • Volume
  • unit: Price