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