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", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}