kestrel-chartkitv0.49.0

← All examples

kestrel_equal_level_liquidity

Kestrel Equal-Level Liquidity: equal-high/low levels clustered within eq_tolerance_atr ATR, pruned by age a…

kestrel_equal_level_liquidity

examples/site_showcase.rs
// Kestrel Equal-Level Liquidity: equal-high/low levels clustered within eq_tolerance_atr ATR, pruned by age and distance, ranked by touches, freshness and distance (primary/secondary per side); sweep vs. breakout, stop hunt (rejection candle + volume spike), reclaim within reclaim_bars with a 0..100 score; value = bias; extra: primary/secondary_bsl/ssl (+_score, primary _touches), bsl_count, ssl_count, recent_bull/bear_score, volume_ratio, bear/bull_reclaim_score, atr, tolerance (eq_tolerance_atr x atr), and every level with at least list_min_touches pivots as bsl_levels/ssl_levels and bsl_<i>_/ssl_<i>_ price, touches, tests, status (0 unswept, 1 swept, 2 broken out, 3 reclaimed), first_bars_back, last_bars_back, swept_bars_back, event (bits: 1 pivot, 2 test, 4 sweep, 8 breakout, 16 stop hunt, 32 reclaim); alerts bear_bsl_sweep, bull_ssl_sweep, bull_bsl_breakout, bear_ssl_breakout, bear_bsl/bull_ssl_stop_hunt, bear/bull_reclaim, bear/bull_premium_reclaim (prefix = expected move), primary_bsl/ssl_near
// Defaults of "kestrel_equal_level_liquidity" (see the indicator reference)
let params = HashMap::from([
    ("alert_distance_atr".to_string(), 1.0),
    ("eq_tolerance_atr".to_string(), 0.12),
    ("list_min_touches".to_string(), 2.0),
    ("max_age".to_string(), 400.0),
    ("max_distance_atr".to_string(), 8.0),
    ("min_touches".to_string(), 2.0),
    ("min_volume_ratio".to_string(), 1.2),
    ("pivot_len".to_string(), 8.0),
    ("reclaim_bars".to_string(), 3.0),
]);
let mut indicator = build_checked("kestrel_equal_level_liquidity", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Kestrel Equal-Level Liquidity: equal-high/low levels clustered within eq_tolerance_atr ATR, pruned by age and distance, ranked by touches, freshness and distance (primary/secondary per side); sweep vs. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 0 alerts in view, the latest as markers.Kestrel Equal-Level Liquidity: equal-high/low levels clustered within eq_tolerance_atr ATR, pruned by age and distance, ranked by touches, freshness and distance (primary/secondary per side); sweep vs. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 0 alerts in view, the latest as markers.
  • Composite read-outs, part 2
  • unit: Unitless