kestrel-chartkitv0.49.0

← All examples

market_facilitation

Market facilitation index

market_facilitation

examples/site_showcase.rs
// Market facilitation index (Williams, 1995): the bar's range per unit of volume, with the state green, fade, fake or squat from the change of the index and of the volume against the previous bar; neutral where either is unchanged
// Defaults of "market_facilitation" (see the indicator reference)
let params = HashMap::new();
let mut indicator = build_checked("market_facilitation", &params)?;

for bar in &bars {
    if let Some(output) = indicator.on_bar(bar) {
        // output.value, output.extra[...], indicator.alerts()
    }
}
Market facilitation index (Williams, 1995): the bar's range per unit of volume, with the state green, fade, fake or squat from the change of the index and of the volume against the previous bar; neutral where either is unchanged. 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.Market facilitation index (Williams, 1995): the bar's range per unit of volume, with the state green, fade, fake or squat from the change of the index and of the volume against the previous bar; neutral where either is unchanged. 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.
  • Volume
  • unit: Unitless