MarketFacilitationIndex — Market Facilitation Index
Bar range per unit of volume: how much price movement each contract bought. Bill Williams reads it in a 2×2 with volume’s own direction — MFI up on rising volume is a real move; MFI up on falling volume is a move nobody is defending.
Signature
MarketFacilitationIndex(period, scale, on=<source>)| Argument | Type | Required | Notes |
|---|---|---|---|
period |
int Param or literal | Yes | SMA smoothing. 1 returns the raw per-bar value. Bounds 1–200. |
scale |
int Param or literal | Yes | Volume divisor keeping the value readable. Default 1,000,000. Bounds 1–1e9. |
on= |
symbol | No | Source symbol. Defaults to the trade symbol. Reads high, low, volume. |
Formula
$$ \text{MFI} = \frac{H - L}{V / \text{scale}} $$
Warmup
period bars; zero-volume bars contribute 0.
Reading the value
mfi.valuemfi.value > mfi.value_at(1)Example
class FacilitationRead(Strategy): """Williams' green bar: facilitation and volume both rising.""" trade = Symbol() sizing = FixedCapital()
def execute(self): mfi = MarketFacilitationIndex(1, 1000000, on=self.trade) rv = RelativeVolume(20, on=self.trade) if mfi.value > mfi.value_at(1) and rv.value > 1 and self.trade.is_flat: self.buy(self.trade, reason="Movement and participation both up") if mfi.value < mfi.value_at(1) and self.trade.is_long: self.sell(self.trade, self.trade.position, reason="Facilitation falling")Notes
- Bill Williams, Trading Chaos (1995). Not the same as
MoneyFlowIndexdespite sharing the MFI abbreviation.