kestrel-chartkitv0.49.0

← All examples

volume_price_confirmation

Volume price confirmation indicator

volume_price_confirmation

examples/site_showcase.rs
// Volume price confirmation indicator (Dormeier, 2007): the gap between the volume weighted and the plain average close over the long window, times the same ratio over the short window, times the short over the long average volume; the signal is the mean of the last smoothing values. The price ratio divides by the mean close
// Defaults of "volume_price_confirmation" (see the indicator reference)
let params = HashMap::from([
    ("long".to_string(), 20.0),
    ("short".to_string(), 5.0),
    ("smoothing".to_string(), 20.0),
]);
let mut indicator = build_checked("volume_price_confirmation", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Volume price confirmation indicator (Dormeier, 2007): the gap between the volume weighted and the plain average close over the long window, times the same ratio over the short window, times the short over the long average volume; the signal is the mean of the last smoothing values. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 26 alerts in view, the latest as markers.Volume price confirmation indicator (Dormeier, 2007): the gap between the volume weighted and the plain average close over the long window, times the same ratio over the short window, times the short over the long average volume; the signal is the mean of the last smoothing values. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 26 alerts in view, the latest as markers.
  • Volume
  • unit: Unitless