MFI
Buying against selling money flow, weighted by volume, from 0 to 100.
Money Flow Index: raw money flow = typical price (hlc3) × volume, counted positive when the typical price rose from the previous candle, negative when it fell, neither when unchanged; MFI = 100 × positive ÷ (positive + negative) over the last length changes. Ready at length + 1 candles; not ready when both sums are 0. Mirror: midpoint 50 (a mirrored price swaps positive and negative flow; volume itself is unchanged).
Settings
| Setting | Default | Range | What it does |
|---|---|---|---|
| length | 14 | 1 to 500 | Changes in the window. |
What it gives
| Output | What it is |
|---|---|
| mfi | MFI, 0–100. |
What it reads
It reads the whole candle (open, high, low, close and volume).
Warm-up
With its default settings, MFI needs 15 closed candles before its first value. A backtest loads them before its start date, so the first trade can already use it.
Test it
Copy this sentence into the Algonney chat to backtest it:
Backtest a strategy on BTC that uses MFI with its default settings