bbtrend
BBTrend
bbtrend
examples/site_showcase.rs// BBTrend (how far a short Bollinger set has moved out of a long one, in percent of the short basis; build_typed accepts variance=population|sample for both sets)
// Defaults of "bbtrend" (see the indicator reference)
let params = HashMap::from([
("long_len".to_string(), 50.0),
("mult".to_string(), 2.0),
("short_len".to_string(), 20.0),
]);
let mut indicator = build_checked("bbtrend", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}