The Money Flow Index (MFI) is a momentum oscillator that measures the strength of money flowing into and out of a security. Developed as a "volume-weighted RSI," it combines both price and volume data to identify overbought or oversold conditions.
Our `MFI_Pro` implementation is a unified, professional version that includes an **optional signal line** and allows the calculation to be based on either **standard** or **Heikin Ashi** price data.
- **`CMFICalculator`**: The base class that performs the full MFI and signal line calculation.
- **`CMFICalculator_HA`**: A child class that inherits all logic and only overrides the data preparation step to use the Typical Price derived from smoothed Heikin Ashi candles.
- **Selectable Display Mode:** The indicator includes a `Display Mode` input that allows the user to show either the MFI line by itself or the MFI line together with its moving average signal line.
- **Overbought/Oversold Levels:** The primary use of the MFI is to identify extreme conditions (typically above 80 and below 20).
- **Divergence:** This is the MFI's most powerful signal. A bullish divergence occurs when price makes a lower low, but the MFI makes a higher low. A bearish divergence is the opposite.
- **Signal Line Crossovers:** If the signal line is enabled, crossovers can provide entry and exit signals, similar to other oscillators.
- **Caution:** In a very strong trend, the MFI can remain in overbought or oversold territory for extended periods.