kestrel-chartkitv0.49.0

← All examples

volume_zone_oscillator

Volume zone oscillator

volume_zone_oscillator

examples/site_showcase.rs
// Volume zone oscillator (Khalil and Steckler, 2011): 100 times the average of volume signed by the direction of the close against the average volume, both exponential averages over period bars; a close that did not change counts as zero
// Defaults of "volume_zone_oscillator" (see the indicator reference)
let params = HashMap::from([
    ("period".to_string(), 14.0),
]);
let mut indicator = build_checked("volume_zone_oscillator", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Volume zone oscillator (Khalil and Steckler, 2011): 100 times the average of volume signed by the direction of the close against the average volume, both exponential averages over period bars; a close that did not change counts as zero. 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 zone oscillator (Khalil and Steckler, 2011): 100 times the average of volume signed by the direction of the close against the average volume, both exponential averages over period bars; a close that did not change counts as zero. 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: Ratio