kestrel-chartkitv0.33.0

← All examples

volatility_regime

Volatility Regime & Squeeze Detector

volatility_regime

examples/site_showcase.rs
// Volatility Regime & Squeeze Detector
// Defaults of "volatility_regime" (see the indicator reference)
let params = HashMap::from([
    ("bb_mult".to_string(), 2.0),
    ("kc_mult".to_string(), 1.5),
    ("period".to_string(), 20.0),
]);
let mut indicator = build_checked("volatility_regime", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Volatility Regime & Squeeze Detector. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 126 alerts in view, the latest as markers.Volatility Regime & Squeeze Detector. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 126 alerts in view, the latest as markers.
  • Volatility and trend strength
  • unit: Unitless