kestrel-chartkitv0.33.0

← All examples

order_block

Order block detection from displacement candles

order_block

examples/site_showcase.rs
// Order block detection from displacement candles (ATR-filtered)
// Defaults of "order_block" (see the indicator reference)
let params = HashMap::from([
    ("atr_len".to_string(), 14.0),
    ("min_disp".to_string(), 1.0),
]);
let mut indicator = build_checked("order_block", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Order block detection from displacement candles (ATR-filtered). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 6 alerts in view, the latest as markers.Order block detection from displacement candles (ATR-filtered). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 6 alerts in view, the latest as markers.
  • Market structure and patterns
  • unit: Unitless