kestrel-chartkitv0.33.0

← All examples

persistent_volume_profile

Fixed-price-grid volume profile with real bin lifecycle

persistent_volume_profile

examples/site_showcase.rs
// Fixed-price-grid volume profile with real bin lifecycle (birth/growth/expiry across updates) and a per-bin absorption profile
// Defaults of "persistent_volume_profile" (see the indicator reference)
let params = HashMap::from([
    ("bin_width".to_string(), 1.0),
    ("lookback".to_string(), 70.0),
]);
let mut indicator = build_checked("persistent_volume_profile", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Fixed-price-grid volume profile with real bin lifecycle (birth/growth/expiry across updates) and a per-bin absorption profile. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 14 alerts in view, the latest as markers.Fixed-price-grid volume profile with real bin lifecycle (birth/growth/expiry across updates) and a per-bin absorption profile. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 14 alerts in view, the latest as markers.
  • Volume
  • unit: Price