kestrel-chartkitv0.33.0

← All examples

chandelier_exit

Chandelier Exit

chandelier_exit

examples/site_showcase.rs
// Chandelier Exit (ATR trailing stop with direction flip)
// Defaults of "chandelier_exit" (see the indicator reference)
let params = HashMap::from([
    ("atr_mult".to_string(), 3.0),
    ("length".to_string(), 22.0),
]);
let mut indicator = build_checked("chandelier_exit", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Chandelier Exit (ATR trailing stop with direction flip). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 4 alerts in view, the latest as markers.Chandelier Exit (ATR trailing stop with direction flip). Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 4 alerts in view, the latest as markers.
  • Volatility and trend strength
  • unit: Price