kestrel-chartkitv0.33.0

← All examples

compression_zones

Compression Zones: compression zones from a 0..80 score

compression_zones

examples/site_showcase.rs
// Compression Zones: compression zones from a 0..80 score (ATR compression, ADX chop, volume dry-up where real volume exists, impulse-in, historical S/R reuse) plus range compression and boundary-touch structure; value = score; extra: range_atr, in_zone, zone_high/zone_low, upper_touches, lower_touches, read (bull/bear pressure or continuation), armed, hist_reuse; alerts bull/bear_breakout (close beyond the zone edge within watch_bars after a zone of at least min_zone_bars, with body, close position and volume checks; prefix = expected move)
// Defaults of "compression_zones" (see the indicator reference)
let params = HashMap::from([
    ("adx_max".to_string(), 27.0),
    ("lookback".to_string(), 16.0),
    ("min_score".to_string(), 35.0),
    ("min_touches".to_string(), 2.0),
    ("min_zone_bars".to_string(), 5.0),
    ("range_atr".to_string(), 4.2),
    ("watch_bars".to_string(), 20.0),
]);
let mut indicator = build_checked("compression_zones", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Compression Zones: compression zones from a 0..80 score (ATR compression, ADX chop, volume dry-up where real volume exists, impulse-in, historical S/R reuse) plus range compression and boundary-touch structure; value = score; extra: range_atr, in_zone, zone_high/zone_low, upper_touches, lower_touches, read (bull/bear pressure or continuation), armed, hist_reuse; alerts bull/bear_breakout (close be. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 3 alerts in view, the latest as markers.Compression Zones: compression zones from a 0..80 score (ATR compression, ADX chop, volume dry-up where real volume exists, impulse-in, historical S/R reuse) plus range compression and boundary-touch structure; value = score; extra: range_atr, in_zone, zone_high/zone_low, upper_touches, lower_touches, read (bull/bear pressure or continuation), armed, hist_reuse; alerts bull/bear_breakout (close be. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 3 alerts in view, the latest as markers.
  • Composite read-outs, part 1
  • unit: Ratio