kestrel-chartkitv0.49.0

← All examples

kestrel_flow_exhaustion

Kestrel Flow Exhaustion

kestrel_flow_exhaustion

examples/site_showcase.rs
// Kestrel Flow Exhaustion (MFI + StochRSI): value = JMA-smoothed MFI of hlc3 (needs real volume, otherwise no output), secondary = JMA-smoothed StochRSI K; extra: stoch_k, upper/lower (adaptive zones over zone_lookback MFI values), divergence_score (signed, on emitting bars); alerts bull/bear_exhaustion (MFI in/leaving its zone + K crossing stoch_os/stoch_ob; prefix = expected move), bull/bear_divergence (price-pivot divergence of the MFI, emitted with its final score after react_bars)
// Defaults of "kestrel_flow_exhaustion" (see the indicator reference)
let params = HashMap::from([
    ("confirm_bars".to_string(), 1.0),
    ("jma_len".to_string(), 20.0),
    ("k_smooth".to_string(), 3.0),
    ("mfi_len".to_string(), 14.0),
    ("pivot_len".to_string(), 7.0),
    ("react_bars".to_string(), 10.0),
    ("rsi_len".to_string(), 14.0),
    ("stoch_len".to_string(), 14.0),
    ("zone_lookback".to_string(), 200.0),
]);
let mut indicator = build_checked("kestrel_flow_exhaustion", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Kestrel Flow Exhaustion (MFI + StochRSI): value = JMA-smoothed MFI of hlc3 (needs real volume, otherwise no output), secondary = JMA-smoothed StochRSI K; extra: stoch_k, upper/lower (adaptive zones over zone_lookback MFI values), divergence_score (signed, on emitting bars); alerts bull/bear_exhaustion (MFI in/leaving its zone + K crossing stoch_os/stoch_ob; prefix = expected move), bull/bear_diver. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 1 alerts in view, the latest as markers.Kestrel Flow Exhaustion (MFI + StochRSI): value = JMA-smoothed MFI of hlc3 (needs real volume, otherwise no output), secondary = JMA-smoothed StochRSI K; extra: stoch_k, upper/lower (adaptive zones over zone_lookback MFI values), divergence_score (signed, on emitting bars); alerts bull/bear_exhaustion (MFI in/leaving its zone + K crossing stoch_os/stoch_ob; prefix = expected move), bull/bear_diver. Default parameters on synthetic 4-hour bars of a fictitious CASOON share (invented prices), the last 150 bars; 1 alerts in view, the latest as markers.
  • Composite read-outs, part 1
  • unit: Ratio