Money Flow Index
systemic:core-mfiIndicatorsfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| Window | integer | The number of periods used to calculate positive and negative money flow sums. |
| Price High | floatarray | The highest traded price for each period in the input series. |
| Price Low | floatarray | The lowest traded price for each period in the input series. |
| Price Close | floatarray | The final traded price for each period in the input series. |
| Volume | floatarray | The trading volume for each period—the total quantity of the asset exchanged. |
Outputs
| Name | Type | Description |
|---|---|---|
| Mfi | floatarray | The Money Flow Index value for each period—a bounded oscillator ranging from 0 to 100. |
The Problem RSI Couldn't Solve
In the 1980s, J. Welles Wilder's RSI had become the go-to momentum oscillator. Traders everywhere used it. But two technical analysts—Gene Quong and Avrum Soudack—noticed something troubling.
Consider two price movements:
- Stock rises 5% on 50% below-average volume
- Stock rises 5% on 200% above-average volume
RSI shows identical readings for both. But any experienced trader knows these are completely different situations. The first might be a weak drift; the second signals institutional conviction.
Quong and Soudack's insight: Volume is the missing variable.
In the late 1980s, they created the Money Flow Index—essentially RSI with volume baked in. Instead of tracking just price momentum, MFI tracks where the money is actually flowing.
💡 MFI answers the question RSI can't: "Is real money backing this move?"
Why This Matters
Traditional momentum oscillators measure speed. MFI measures conviction.
| Scenario | Price Change | Volume | RSI Says | MFI Says |
|---|---|---|---|---|
| Weak rally | +3% | Low | "Momentum up" | "Weak—no conviction" |
| Strong rally | +3% | High | "Momentum up" | "Strong—money flowing in" |
| Distribution | +1% | Very high | "Slight momentum" | "Smart money selling" |
This volume context makes MFI particularly valuable for:
- Spotting divergences between price and money flow
- Confirming breakouts with real buying pressure
- Identifying distribution (smart money exiting) before price drops
Mathematical Foundation
Step 1: Typical Price
The Typical Price represents the average price for each period.
Step 2: Raw Money Flow
This quantifies the dollar value traded during the period.
Step 3: Classify Money Flow
| Condition | Classification |
|---|---|
| TP > Previous TP | Positive Money Flow |
| TP < Previous TP | Negative Money Flow |
| TP = Previous TP | Neutral (typically excluded) |
Step 4: Money Flow Ratio
Summed over the lookback window (typically 14 periods).
Step 5: Money Flow Index
This normalizes the ratio to a 0-100 scale, where:
- Higher values indicate more buying pressure
- Lower values indicate more selling pressure
Visual Calculation Flow
flowchart TB
subgraph INPUT["📥 OHLCV Data"]
H["High"]
L["Low"]
C["Close"]
V["Volume"]
end
subgraph CALC1["🧮 Typical Price"]
TP["TP = (H + L + C) / 3"]
end
subgraph CALC2["💰 Raw Money Flow"]
RMF["RMF = TP × Volume"]
end
subgraph CLASS["📊 Classify"]
POS["Positive Flow<br/>(TP rising)"]
NEG["Negative Flow<br/>(TP falling)"]
end
subgraph RATIO["📈 Money Flow Ratio"]
MFR["Sum Positive / Sum Negative"]
end
subgraph OUTPUT["🎯 MFI Output"]
MFI["100 - 100/(1 + MFR)"]
end
H --> TP
L --> TP
C --> TP
TP --> RMF
V --> RMF
RMF --> POS
RMF --> NEG
POS --> MFR
NEG --> MFR
MFR --> MFI
style OUTPUT fill:#d5f5e3,stroke:#27ae60
Interpreting MFI
Standard Thresholds
| MFI Level | Interpretation |
|---|---|
| > 80 | Overbought — potential selling pressure ahead |
| 50 | Neutral — balanced buying/selling |
| < 20 | Oversold — potential buying pressure ahead |
MFI vs Price Divergence
| Divergence Type | Price | MFI | Signal |
|---|---|---|---|
| Bullish | Lower lows | Higher lows | Smart money accumulating |
| Bearish | Higher highs | Lower highs | Smart money distributing |
Divergences are particularly powerful with MFI because they suggest that volume-backed conviction doesn't match price direction.
Trading Strategies
Strategy 1: Overbought/Oversold
The classic mean-reversion approach.
| Condition | Action |
|---|---|
| MFI crosses below 20 from above | Potential buy signal |
| MFI crosses above 80 from below | Potential sell signal |
Best in: Range-bound markets. Avoid in: Strong trends.
Strategy 2: Failure Swings
More reliable than simple threshold crosses.
Bullish Failure Swing:
- MFI falls below 20
- MFI rallies above 20
- MFI pulls back but stays above 20
- MFI breaks above prior high → Buy
Bearish Failure Swing:
- MFI rises above 80
- MFI falls below 80
- MFI bounces but stays below 80
- MFI breaks below prior low → Sell
Strategy 3: Volume Confirmation
Use MFI to confirm price breakouts.
| Scenario | MFI Behavior | Interpretation |
|---|---|---|
| Price breaks resistance | MFI rising toward 80 | Strong breakout — volume confirms |
| Price breaks resistance | MFI falling or flat | Weak breakout — lack of conviction |
MFI vs Related Indicators
| Indicator | Uses Volume? | Scale | Best For |
|---|---|---|---|
| MFI | ✅ Yes | 0-100 | Volume-confirmed reversals |
| RSI | ❌ No | 0-100 | Pure price momentum |
| CMF | ✅ Yes | -1 to +1 | Accumulation/distribution |
| OBV | ✅ Yes | Unbounded | Trend confirmation |
| A/D Line | ✅ Yes | Unbounded | Long-term accumulation |
When to Choose MFI
- You want overbought/oversold signals backed by volume
- You suspect price moves aren't supported by real money flow
- You want to confirm breakouts with volume conviction
Configuration
Window Parameter
| Window | Effect | Use Case |
|---|---|---|
| 7 | More responsive, more signals | Short-term trading, volatile assets |
| 14 (default) | Balanced | Most situations |
| 21 | Smoother, fewer signals | Swing trading, less noise |
Input Requirements
| Input | Description |
|---|---|
| High | Period high price |
| Low | Period low price |
| Close | Period closing price |
| Volume | Trading volume |
Note: All four inputs must be the same length and from the same timeframe.
When MFI Excels
Ranging Markets
- Overbought/oversold signals work beautifully
- Mean reversion trades have volume confirmation
- Failure swings provide clear reversal setups
Breakout Confirmation
- High MFI during breakout = volume conviction
- Low MFI during breakout = likely false breakout
Divergence Trading
- Volume-backed divergences are more reliable than price-only
- Reveals accumulation/distribution before price moves
- "Smart money" patterns become visible
Multi-Asset Comparison
- Same 0-100 scale across all assets
- Easily compare buying pressure across portfolio
When MFI Struggles
Strong Trends
- Stays overbought during powerful uptrends
- Stays oversold during powerful downtrends
- Overbought ≠ "sell" in a bull market
No Volume Data
- Useless for forex spot (no centralized volume)
- Crypto volume varies by exchange
- Some indices lack meaningful volume
Choppy Markets
- Generates many false signals
- Whipsaws around thresholds
- Requires additional filters
Lagging Nature
- Based on historical data
- Signals come after moves start
- Not predictive—reactive
Summary
| Aspect | Detail |
|---|---|
| Full Name | Money Flow Index |
| Inventors | Gene Quong & Avrum Soudack (late 1980s) |
| Core Idea | RSI + Volume = Money conviction |
| Formula | where MFR = Positive Flow ÷ Negative Flow |
| Range | 0 to 100 |
| Overbought | > 80 |
| Oversold | < 20 |
| Requires | High, Low, Close, Volume |
| Default Period | 14 |
| Best For | Volume-confirmed reversals, divergences |
| Weakness | Fails in strong trends, needs volume data |
Combining MFI with Other Modules
| Combination | Purpose |
|---|---|
| MFI + RSI | Compare volume-weighted vs pure momentum |
| MFI + MACD | Volume confirmation of momentum signals |
| MFI + Moving Averages | Only trade MFI signals in trend direction |
| MFI + Price Patterns | Confirm breakouts from chart patterns |
Data Alignment in Systemic
MFI requires four simultaneous inputs (High, Low, Close, Volume) that must be properly aligned before calculation.
Multi-Input Alignment
When connecting data sources with different frequencies or lengths, Systemic automatically aligns them:
| Scenario | Behavior |
|---|---|
| Different frequencies | Lower-frequency data upsampled by repeating values |
| Different lengths | Shorter series padded by extending final values |
| Mixed sources | All inputs aligned to longest/highest-frequency series |
Example: If you connect daily High/Low/Close with hourly Volume:
- Daily price data is upsampled to hourly resolution
- Each daily value repeats for all 24 hourly periods
- The MFI calculation uses the aligned, same-length series
Critical Alignment Note
⚠️ All four inputs should ideally come from the same data source at the same frequency. While Systemic will align mismatched inputs, mixing frequencies can produce misleading MFI values since Volume and Price from different timeframes may not represent the same market activity.
Window Parameter
The window parameter is a constant and does not participate in multi-input alignment.
Missing Data (Closed-Market Bars)
A bar missing any of High, Low, Close, or Volume (a weekend, holiday, or data gap) never fabricates a value: MFI emits null at that slot instead of a carried-forward or neutral reading. Typical-price direction and both money-flow sums run over the N most recently observed bars ("N-bar MFI" = N observed bars, weekends bridged — a Friday-to-Monday pair is treated as adjacent, not two calendar days), so a gap never dilutes the ratio or freezes it at a stale value. A window where every observed bar's typical price genuinely rises keeps its legitimate 100.0 reading (no negative flow exists to divide by) — this is never masked; only a window with no directional flow at all (a fully flat run, or too few observed bars for a complete window) has no determinable ratio and is null.
Indicator Profile
The following chart compares MFI's utility across stocks and cryptocurrency markets:
quadrantChart
title MFI Indicator Profile
x-axis Low Popularity --> High Popularity
y-axis Low Reliability --> High Reliability
quadrant-1 High potential
quadrant-2 Established leaders
quadrant-3 Niche tools
quadrant-4 Popular but risky
MFI - Stocks: [0.65, 0.70]
MFI - Crypto: [0.55, 0.60]
Dimension Ratings
| Dimension | Stocks | Crypto | Notes |
|---|---|---|---|
| Popularity | 6.5/10 | 5.5/10 | Well-known among volume-focused traders. Less popular than RSI or MACD. |
| Reliability | 7.0/10 | 6.0/10 | Volume confirmation adds value. Crypto volume varies by exchange. |
| Complexity | 5.0/10 | 5.0/10 | Requires understanding of typical price and money flow concepts. |
| Versatility | 6.0/10 | 5.5/10 | Requires volume data—limited for forex. Works across timeframes. |
| Recent Interest | 5.5/10 | 6.0/10 | Steady classic indicator. Gaining interest in crypto for smart money detection. |
Further Reading
- Investopedia: Money Flow Index — Comprehensive overview
- MFI Trading Strategies — Practical applications
- Typical Price Explained — Understanding the building block
- Volume Analysis — Why volume matters