Systemicbeta

Money Flow Index

systemic:core-mfiIndicators

Inputs

NameTypeDescription
WindowWhole numberThe number of bars used to sum the positive and negative money flow.
Price HighNumber seriesThe highest price of each bar.
Price LowNumber seriesThe lowest price of each bar.
Price CloseNumber seriesThe closing price of each bar.
VolumeNumber seriesThe trading volume of each bar: the total quantity of the asset traded.

Outputs

NameTypeDescription
MfiNumber seriesThe Money Flow Index of each bar, an oscillator between 0 and 100.

Cost

7
credits per run
1,000
bars

0.215 + 0.00627·n credits for n bars, rounded up. The marks are each plan's limit of bars.

The Problem RSI Couldn't Solve

In the 1980s, J. Welles Wilder's RSI was the most popular momentum oscillator. But two technical analysts, Gene Quong and Avrum Soudack, noticed a problem.

Consider two price movements:

  1. Stock rises 5% on 50% below-average volume
  2. Stock rises 5% on 200% above-average volume

RSI shows identical values for both. But these are very different situations. The first may be a weak drift. The second suggests that large investors are buying.

Quong and Soudack's insight: Volume is the missing variable.

In the late 1980s, they created the Money Flow Index: in essence, RSI with volume included. MFI tracks not only price momentum but also where the money is 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.

ScenarioPrice ChangeVolumeRSI SaysMFI 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 useful 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

TP=High+Low+Close3\text{TP} = \frac{\text{High} + \text{Low} + \text{Close}}{3}

The Typical Price is the average price of each bar.

Step 2: Raw Money Flow

Raw Money Flow=TP×Volume\text{Raw Money Flow} = \text{TP} \times \text{Volume}

This is the money value traded during the bar.

Step 3: Classify Money Flow

ConditionClassification
TP > Previous TPPositive Money Flow
TP < Previous TPNegative Money Flow
TP = Previous TPNeutral (not counted in either sum)

Step 4: Money Flow Ratio

MFR=∑Positive Money Flow∑Negative Money Flow\text{MFR} = \frac{\sum \text{Positive Money Flow}}{\sum \text{Negative Money Flow}}

Summed over the window (typically 14 bars).

Step 5: Money Flow Index

MFI=100−1001+MFR\text{MFI} = 100 - \frac{100}{1 + \text{MFR}}

This puts the ratio on 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 LevelInterpretation
> 80Overbought — potential selling pressure ahead
50Neutral — balanced buying/selling
< 20Oversold — potential buying pressure ahead

MFI vs Price Divergence

Divergence TypePriceMFISignal
BullishLower lowsHigher lowsSmart money accumulating
BearishHigher highsLower highsSmart money distributing

Divergences are strong signals with MFI, because they show that the volume does not support the price direction.


Trading Strategies

Strategy 1: Overbought/Oversold

The classic mean-reversion approach.

ConditionAction
MFI crosses below 20 from abovePotential buy signal
MFI crosses above 80 from belowPotential sell signal

Best in: Range-bound markets. Avoid in: Strong trends.

Strategy 2: Failure Swings

More reliable than simple threshold crosses.

Bullish Failure Swing:

  1. MFI falls below 20
  2. MFI rallies above 20
  3. MFI pulls back but stays above 20
  4. MFI breaks above its prior high → Buy signal

Bearish Failure Swing:

  1. MFI rises above 80
  2. MFI falls below 80
  3. MFI bounces but stays below 80
  4. MFI breaks below its prior low → Sell signal

Strategy 3: Volume Confirmation

Use MFI to confirm price breakouts.

ScenarioMFI BehaviorInterpretation
Price breaks resistanceMFI rising toward 80Strong breakout — volume confirms
Price breaks resistanceMFI falling or flatWeak breakout — lack of conviction

IndicatorUses Volume?ScaleBest For
MFI✅ Yes0-100Volume-confirmed reversals
RSI❌ No0-100Pure price momentum
CMF✅ Yes-1 to +1Accumulation/distribution
OBV✅ YesUnboundedTrend confirmation
A/D Line✅ YesUnboundedLong-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

WindowEffectUse Case
7More responsive, more signalsShort-term trading, volatile assets
14 (standard)BalancedMost situations
21Smoother, fewer signalsSwing trading, less noise

Input Requirements

InputDescription
HighHighest price of the bar
LowLowest price of the bar
CloseClosing price of the bar
VolumeTrading volume of the bar

Note: All four inputs should come from the same symbol and the same period.


When MFI Excels

Ranging Markets

  • Overbought/oversold signals work well
  • 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
  • Easy to compare buying pressure across a 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

  • Not usable 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

AspectDetail
Full NameMoney Flow Index
InventorsGene Quong & Avrum Soudack (late 1980s)
Core IdeaRSI + Volume = Money conviction
Formula100−1001+MFR100 - \frac{100}{1 + MFR} where MFR = Positive Flow ÷ Negative Flow
Range0 to 100
Overbought> 80
Oversold< 20
RequiresHigh, Low, Close, Volume
Standard Window14
Best ForVolume-confirmed reversals, divergences
WeaknessFails in strong trends, needs volume data

Combining MFI with Other Modules

CombinationPurpose
MFI + RSICompare volume-weighted vs pure momentum
MFI + MACDVolume confirmation of momentum signals
MFI + Moving AveragesKeep only MFI signals in the trend direction
MFI + Price PatternsConfirm breakouts from chart patterns

Data Alignment in Systemic

MFI takes four series (High, Low, Close, Volume). Systemic aligns them by time before the calculation.

Multi-Input Alignment

When the connected series have different periods or lengths, Systemic aligns them automatically:

ScenarioBehavior
Different periodsThe series with the longer period repeats its last value until its next bar
Different lengthsThe result covers the dates that all four series share
Mixed sourcesAll inputs are aligned to the series with the shortest period

Example: If you connect daily High/Low/Close with hourly Volume:

  • The daily prices are repeated on the hourly bars
  • Each daily value repeats for all 24 hourly bars
  • The MFI calculation uses the aligned series

Critical Alignment Note

⚠️ All four inputs should come from the same data source and the same period. Systemic aligns mismatched inputs, but mixing periods can give misleading MFI values: Volume and Price from different periods do not describe the same market activity.

Window Parameter

The window parameter is a constant: one fixed value for the whole run.

Missing Data (Closed-Market Bars)

A bar that misses any of High, Low, Close or Volume (a weekend, holiday or data gap) is a missing bar. MFI is empty on that bar. It never repeats an earlier value. The direction of the typical price and both money-flow sums use the N most recent bars that have data, so Friday and Monday count as neighbours and a gap does not distort the ratio. A window where the typical price rises on every bar gives 100.0 (there is no negative flow). MFI is empty only when the window has no rising or falling bar at all (a fully flat run), or when there are fewer than N bars with data (warm-up).


Indicator Profile

This chart compares how useful MFI is for stocks and for cryptocurrencies:

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

DimensionStocksCryptoNotes
Popularity6.5/105.5/10Well-known among volume-focused traders. Less popular than RSI or MACD.
Reliability7.0/106.0/10Volume confirmation adds value. Crypto volume varies by exchange.
Complexity5.0/105.0/10Requires understanding of typical price and money flow concepts.
Versatility6.0/105.5/10Requires volume data—limited for forex. Works across timeframes.
Recent Interest5.5/106.0/10Steady classic indicator. Gaining interest in crypto for smart money detection.

Further Reading

Rendering diagrams...
© 2026 WanoLabs. All rights reservedBeta v0.1.5