kestrel-chartkitv0.33.0

← All examples

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", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Break of structure / change of character (BOS/CHoCH) detection. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 5 alerts in view, the latest as markers.Break of structure / change of character (BOS/CHoCH) detection. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 5 alerts in view, the latest as markers.
  • Market structure and patterns
  • unit: Unitless