market_structure_breaks
Break of structure / change of character
market_structure_breaks
examples/site_showcase.rs// Break of structure / change of character (BOS/CHoCH) detection
// Defaults of "market_structure_breaks" (see the indicator reference)
let params = HashMap::from([
("lookback".to_string(), 5.0),
]);
let mut indicator = build_checked("market_structure_breaks", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}