pivots_structure
Swing pivot detection with a rolling structure score
pivots_structure
examples/site_showcase.rs// Swing pivot detection with a rolling structure score
// Defaults of "pivots_structure" (see the indicator reference)
let params = HashMap::from([
("left_bars".to_string(), 5.0),
("right_bars".to_string(), 5.0),
("score_window".to_string(), 10.0),
]);
let mut indicator = build_checked("pivots_structure", ¶ms)?;
for bar in &bars {
if let Some(output) = indicator.on_bar(bar) {
// output.value, output.extra[...], indicator.alerts()
}
}