Momentum Indicators

MFI (Money Flow Index): Volume-Weighted RSI | AlfaTactix

📖 6 min read

📝 1,065 words

🏷️ Momentum Indicators

In this page: what MFI is, how it works, when to use it, a practical example with code, and a bonus tip.

Use MFI in a real strategy—no code required

Create a free account to save your progress and build strategies with this indicator and 80+ others in minutes. Backtest, then export to MQL5.


MFI on a price chart: illustration of the indicator and how it is used in technical analysis
MFI – chart illustration

MFI (Money Flow Index) Indicator Explanation

The Money Flow Index (MFI) is a momentum oscillator that combines price and volume to identify overbought and oversold conditions. Developed by Gene Quong and Avrum Soudack in the 1980s and introduced in their technical analysis work, MFI is often referred to as the "volume-weighted RSI" because it uses the same calculation as the Relative Strength Index (RSI) but incorporates volume data. The indicator oscillates between 0 and 100, with values above 80 typically indicating overbought conditions and values below 20 typically indicating oversold conditions. MFI is particularly useful for identifying potential reversals when combined with price action analysis, as volume confirmation adds reliability to momentum signals.

How MFI Works: MFI is calculated using a similar approach to RSI but incorporates volume. First, the "Typical Price" is calculated: Typical Price = (High + Low + Close) / 3. Then, the "Raw Money Flow" is calculated: Raw Money Flow = Typical Price × Volume. Money Flow is positive when the current typical price is higher than the previous typical price (upward price movement), and negative when it's lower (downward price movement). The Money Flow Ratio (MFR) is then calculated: MFR = Positive Money Flow / Negative Money Flow, over a specified period (typically 14 periods). Finally, MFI = 100 - (100 / (1 + MFR)). This calculation ensures that MFI reflects both price momentum and volume, making it more reliable than price-only indicators.

When to Use MFI:

  • Volume-Weighted Overbought/Oversold Identification: MFI is highly effective at identifying overbought conditions (values above 80) and oversold conditions (values below 20) with volume confirmation. The volume weighting makes MFI more reliable than standard RSI, as it confirms that price movements are supported by trading activity.
  • Divergence Analysis: MFI divergence occurs when price makes new highs or lows while MFI fails to confirm, often signaling potential trend reversals. Bullish divergence (price makes lower low, MFI makes higher low) suggests upward momentum building with volume support, while bearish divergence (price makes higher high, MFI makes lower high) suggests downward momentum building.
  • Trend Confirmation: In trending markets, MFI can confirm trend strength when it remains in overbought territory during uptrends or oversold territory during downtrends, indicating strong momentum continuation with volume support.

Advantages:

  • Provides volume-weighted momentum signals that are more reliable than price-only indicators, as volume confirmation adds credibility to price movements. The combination of price and volume makes MFI particularly effective for identifying genuine momentum shifts.
  • Works effectively across multiple timeframes and asset classes, including stocks, forex, commodities, and cryptocurrencies. The indicator is particularly useful in markets where volume data is available and reliable.
  • Helps reduce false signals by requiring volume confirmation for momentum extremes, making it more reliable than standard RSI in volatile or ranging markets. The volume weighting filters out weak price movements.

Limitations:

  • MFI requires reliable volume data, which may not be available or accurate in all markets, particularly in forex markets where volume data can be less reliable. The indicator's effectiveness depends on the quality of volume information.
  • MFI can remain in overbought or oversold territory for extended periods during strong trends, leading to premature exit signals if used in isolation without trend confirmation. The indicator may give false signals in trending markets where prices continue to move in one direction.
  • False signals can occur in ranging markets when MFI oscillates between 20 and 80 without clear directional bias, requiring additional confirmation from other indicators or price action analysis.

In summary, MFI is a valuable momentum oscillator that provides volume-weighted momentum signals, making it more reliable than price-only indicators for identifying overbought and oversold conditions. For comprehensive understanding, refer to Quong and Soudack's original work on MFI, Investopedia's MFI guide, TradingView's MFI documentation, and academic research on volume-weighted momentum indicators in technical analysis published in journals such as the Journal of Financial Markets and the Review of Financial Studies.

Practical Example: Using the MFI Indicator in a Trading Strategy

The Money Flow Index (MFI) is a momentum oscillator used to identify overbought and oversold conditions by combining price and volume data. In a trading strategy, the MFI indicator helps traders make entry and exit decisions based on volume-weighted momentum extremes and potential reversal signals.

Scenario: You're creating a mean-reversion strategy for Apple stock (AAPL) on a daily chart. You want to buy when the stock is oversold (MFI below 20) with volume confirmation, and sell when it's overbought (MFI above 80) with volume confirmation, assuming prices will revert to the mean after reaching extreme momentum levels.

Strategy Logic:

  • Calculate the MFI(14) to measure current momentum conditions with volume weighting. The MFI oscillates between 0 and 100, where values below 20 indicate oversold conditions and values above 80 indicate overbought conditions. The volume weighting makes MFI more reliable than standard RSI.
  • Buy signal: When MFI crosses below 20 (oversold condition) and then crosses back above 20, indicating potential upward momentum reversal with volume support.
  • Sell signal: When MFI crosses above 80 (overbought condition) and then crosses back below 80, indicating potential downward momentum reversal with volume support.

Backtrader Example:

import backtrader as bt

class MFIMeanReversionStrategy(bt.Strategy):
    params = dict(
        mfi_period=14,
        oversold_level=20,
        overbought_level=80
    )
    
    def __init__(self):
        self.mfi = bt.ind.MFI(period=self.p.mfi_period)
        
    def next(self):
        if not self.position:
            # Buy when MFI crosses back above oversold level (20)
            if (self.mfi[0] > self.p.oversold_level and 
                self.mfi[-1] <= self.p.oversold_level):
                self.buy()
        else:
            # Sell when MFI crosses back below overbought level (80)
            if (self.mfi[0] < self.p.overbought_level and 
                self.mfi[-1] >= self.p.overbought_level):
                self.sell()

# Usage
cerebro = bt.Cerebro()
cerebro.addstrategy(MFIMeanReversionStrategy)

Expected Outcome: By using the MFI indicator, your strategy identifies momentum extremes with volume confirmation, helping you enter trades when prices are likely to revert to the mean with strong volume support. This approach leads to better entry timing, reduced false signals, and improved risk-reward ratios in ranging markets where volume confirmation adds reliability to momentum signals.

💡 Bonus Tip

Consider using MFI divergence as a confirmation signal. When price makes a new low but MFI makes a higher low, it suggests weakening downward momentum with volume support and potential bullish reversal. This technique, documented in technical analysis literature, can significantly improve the accuracy of MFI-based trading strategies by identifying momentum shifts before price reversals occur.

Using the MFI indicator ensures your strategy captures momentum shifts effectively with volume confirmation, improving entry and exit timing based on volume-weighted momentum measurements.

Use MFI in a real strategy—no code required

Create a free account to save your progress and build strategies with this indicator and 80+ others in minutes. Backtest, then export to MQL5.

Try Strategy Builder

Use this indicator in Strategy Builder — free

Create free account