MFI
MFI
Summary
Money Flow Index: a volume-weighted momentum oscillator (0-100) comparing positive vs negative money flow over a period. A volume-based analog of RSI. >80 overbought, <20 oversold.
Formula
TP = (High+Low+Close)/3; MF = TP*Volume, classed positive if TP>prevTP, negative if TP<prevTP, neither if equal. MFI = 100 * posSumMF/(posSumMF+negSumMF).
Notes
- When the typical price is unchanged from the prior bar, that bar's money flow is counted as neither positive nor negative.
Inputs
inHigh— High price of each barinLow— Low price of each barinClose— Close price of each barinVolume— Volume of each bar
Outputs
outReal— Money Flow Index
Parameters
| Parameter | Type | Default | Accepted values | Description |
|---|---|---|---|---|
optInTimePeriod | integer | 14 | 2–100000 | Lookback window for summing money flow |
Properties
Numerical Stability: Start-Independent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
Implementation
TA-Lib Definition: mfi.c · mfi.yaml
| Native | File |
|---|---|
| C | ta_MFI.c |
| Rust | mfi.rs |
| Java | Core_MFI.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Money Flow Index
See Also
References
- Gene Quong & Avrum Soudack, Volume-Weighted RSI: Money Flow, Technical Analysis of Stocks & Commodities, V.7:3 (March 1989)