← Back to Home
Trading Signal / Indicator
💰

Money Flow Index (MFI)

A volume-weighted RSI that measures buying and selling pressure.

Start Automating Free →

Want to automate this strategy? Try auto-Trading free — no credit card required.

Money Flow Index (MFI) chart

Overview

What is Money Flow Index (MFI)?

The Money Flow Index (MFI) was developed by Gene Quong and Avrum Soudack and is sometimes called the "volume-weighted RSI" because its construction mirrors RSI's logic but incorporates volume into each period's calculation. This makes MFI a more comprehensive measure of money flow — the actual buying and selling pressure — rather than just price momentum.

The indicator starts with Typical Price (High + Low + Close) / 3. When typical price rises from the prior period, the day's Raw Money Flow (Typical Price × Volume) is positive; when it falls, it is negative. The ratio of positive to negative money flow over the lookback period is transformed through the same RSI formula to produce a 0–100 oscillator.

Like RSI, values above 80 are considered overbought and values below 20 oversold — but because volume is included, these signals are considered more reliable than RSI alone. A security with high price but declining MFI suggests that the rally is not supported by increasing participation, which is bearish.

MFI divergence is particularly valued: when price makes new highs but MFI fails to confirm, it suggests distribution is occurring. The reverse signals accumulation before an upside move. This makes MFI a leading indicator capable of anticipating reversals before they appear in price alone.

How It Works in auto-Trading

Automate It

auto-Trading uses MFI as a standalone signal generator and as a confirmation filter. Build strategies that buy oversold MFI readings (< 20) in uptrending assets, or sell overbought readings (> 80) in downtrends. MFI divergence scanning is available across all instruments to find accumulation/distribution setups automatically.

Try Free →

Strategy Code

Pick a script below, copy it, and use it on your chart.

Pine Script (TradingView)

This is a TradingView Pine Script example for this indicator. Paste it into the TradingView Pine Editor, add it to your chart, and adjust inputs for your market and timeframe.

//@version=6
strategy("Money Flow Index (MFI)", overlay=true)
fastLen = input.int(20, "Fast Length")
slowLen = input.int(50, "Slow Length")
fast = ta.ema(close, fastLen)

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

ThinkScript (thinkorswim)

This is a thinkorswim ThinkScript example for this indicator. Open thinkorswim, create a custom study, paste the script, and apply it to your chart.

input length = 14;
def mfi = MoneyFlowIndex(length = length);
def buySignal = mfi crosses above 20;
def sellSignal = mfi crosses below 80;
AddOrder(OrderType.BUY_AUTO, buySignal, close, 1, Color.GREEN, Color.GREEN, "MFI Buy");

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

Ready to automate Money Flow Index (MFI)?

Join thousands of traders who use auto-Trading to execute this strategy automatically, 24/7.

Get Started Free →

All Strategies & Signals

Continue Learning

Trading Strategies

Trading Signals & Indicators