kestrel-chartkitv0.33.0

← All examples

flow_exhaustion

Flow Exhaustion

flow_exhaustion

examples/site_showcase.rs
// 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 "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("flow_exhaustion", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
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 (p. 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.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 (p. 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