mfi

Money Flow Index (Volume-weighted momentum oscillator)

mfi(period)

Parameters

Money Flow Index - mfi(period)

A volume-weighted momentum oscillator that measures buying and selling pressure.

Often called "volume-weighted RSI" as it incorporates volume into the calculation.

  • period (int): Number of periods for money flow calculation
  • Common values: 14 (standard), 10, 20

Formula


MFI = 100 - (100 / (1 + Money Flow Ratio))

Where:
- Money Flow Ratio = Positive Money Flow / Negative Money Flow
- Raw Money Flow = Typical Price * Volume
- Typical Price = (High + Low + Close) / 3
- Positive Flow = Money flow when typical price rises
- Negative Flow = Money flow when typical price falls

Examples


mfi(14);  # Standard 14-period MFI
mfi(10);  # More sensitive 10-period MFI
mfi(14) > 80;  # Overbought with volume confirmation
mfi(14) < 20;  # Oversold with volume confirmation

Returns

MFI value ranging from 0 to 100