Money flow index: formula, 80/20 levels and an ES futures test
The money flow index is RSI with volume in it: it sums typical price × volume on up bars and down bars over 14 bars and scales the ratio from 0 to 100. It only tells you something RSI cannot when volume is lopsided, so test the MFI rule against the same RSI rule with identical costs before trusting it on futures.
By Soren Huang · Published · updated · Editorial policy
Contents
How is the money flow index calculated?
The money flow index is a 0-to-100 oscillator that weighs each bar's price change by its volume. It sums typical price × volume on up bars and on down bars over 14 bars and turns the ratio into one reading. Above 80 means heavy buying, below 20 heavy selling. Before trusting it on futures, test it against RSI after costs.
The money flow index (MFI) is an oscillator that measures buying and selling pressure by combining how far price moved with how much volume moved it. Think of two people pushing a door: price change tells you which way the door moved, volume tells you how hard they pushed. RSI records only the movement. MFI records movement times effort. The calculation runs in four steps, and only the second step uses volume.
- Typical price. Typical price is the average of a bar's high, low and close: (high + low + close) ÷ 3. Use real bars for this step. Smoothed bars such as Heikin Ashi candles replace the high, low and close with averaged values, so the typical price would no longer be a price anyone traded at.
- Raw money flow. Raw money flow is typical price multiplied by the bar's volume. This is the step RSI does not have.
- Positive and negative flow. If a bar's typical price is higher than the previous bar's, its raw money flow counts as positive flow. If lower, it counts as negative flow. Sum each side over the last 14 bars.
- Scale to 0–100. Divide the positive sum by the negative sum to get the money flow ratio, then apply the formula below.
MFI = 100 − 100 ÷ (1 + positive flow ÷ negative flow)
Here positive flow is the 14-bar sum of raw money flow on up bars, negative flow is the 14-bar sum on down bars, and their quotient is the money flow ratio. When the two sums are equal, the ratio is 1 and MFI reads 50. When buying flow is much larger, MFI moves toward 100; when selling flow dominates, toward 0.
Hypothetical example
A bar has a high of 5,010, a low of 4,990 and a close of 5,004. Its typical price is 5,001.33. Over the last 14 bars, in simplified units, the up bars add to a positive flow of 600 and the down bars to a negative flow of 200. The money flow ratio is 600 ÷ 200 = 3.0, so MFI = 100 − 100 ÷ (1 + 3.0) = 75. If the same 14 bars had the same price changes but the up bars came on half the volume, the positive flow would be 300, the ratio 1.5 and MFI 60. Same prices, different reading.
What is the difference between MFI and RSI?
RSI weighs every bar by its price change alone, while MFI weighs each bar by price change times volume, so the two lines agree in direction most of the time and separate only when volume is lopsided. That separation is the one case where MFI can tell you something RSI cannot. On a stretch of bars where volume is roughly even, MFI is RSI drawn with a different pen, and a strategy built on it will fire at nearly the same bars.
RSI is an oscillator introduced by Wilder (1978) that compares the average size of up closes with the average size of down closes over 14 bars and scales the result from 0 to 100. Three mechanical differences follow from the definitions:
| Property | RSI | MFI |
|---|---|---|
| Input per bar | Close-to-close price change | Change in typical price × volume |
| Typical length | 14 bars | 14 bars |
| Usual levels | 70 and 30 | 80 and 20 |
| Needs a volume column | No | Yes |
| How bars are combined | Smoothed averages of gains and losses | Plain 14-bar sums of positive and negative flow |
The practical consequence is the shape of the line. Because MFI uses plain sums, a single high-volume bar enters the sum at full weight and leaves it exactly 14 bars later, so MFI jumps and then drops back more sharply than RSI. The wider 80/20 levels exist partly because of this jumpier behaviour. The second consequence is divergence: when price rises on thin volume and falls on heavy volume, RSI can sit near 50 while MFI slides toward 30. That picture is the whole case for MFI, and it is also the thing to test rather than assume. The broader question of which technical analysis indicators can be tested at all starts with whether their inputs, here volume, are trustworthy on your data.
How do you use the 80 and 20 levels?
The 80 and 20 levels mark heavy buying and heavy selling pressure, and a testable rule fires on the re-cross back inside the band, with the entry on the next bar's open and the exit written before the first run. A reading above 80 says that over the last 14 bars, volume-weighted buying was at least four times volume-weighted selling. It does not say price must turn. In a strong trend MFI can stay above 80 for many bars, so a rule that sells on the first touch sells into the trend.
A rule you can backtest has every part fixed in advance. The version below is the common reversion form:
- Short setup: MFI closes above 80, then later closes back below 80. The signal bar is the one that closes back below. No signal on the first touch.
- Long setup: MFI closes below 20, then later closes back above 20. Mirror image.
- Entry: market order at the open of the bar after the signal bar. Deciding on a close and filling on that same close uses a price you could not have traded.
- Exit: one of three, chosen before the test: MFI crosses back through 50, a fixed number of bars, or the opposite signal. Write down which one. Adding a stop or target later is a second strategy, not a refinement.
- Costs: commission and slippage on every trade from the first run, as described in trading costs in backtests. A rule that fires often on daily bars and holds a few days has an average trade small enough that costs decide the sign.
Is MFI accurate on futures? A reversion test on ES
An oscillator reversion rule can look strong on ES daily bars, but the result below comes from a plain RSI stand-in picked after the fact out of 1,024 candidates, so it sets a bar the MFI version has to clear rather than proving that MFI predicts turns. Accuracy for an indicator is not a percentage of correct calls. It is the average trade after costs of a fully written rule, compared with the simplest rule that does the same job without the extra input. For MFI, that simpler rule is RSI.
The run below tested ES daily bars from 2019-01-02 to 2025-06-30, long and short, one contract, with $20 commission and $25 slippage per trade. The search tried 1,024 candidates and kept one for its return against its drawdown. The kept candidate uses an RSI rule as its only entry and exit, no stop or target, no filters. It is a stand-in built from standard indicators, not an MFI rule, because the point is to measure what price-only reversion already does on this market before volume weighting is added on top.
Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $89,155 |
| Max drawdown | $68,387.5 |
| Trades | 56 |
| Win rate | 58.93% |
| Profit factor | 1.693 |
| Average trade | $1,592.05 |
| Time in market | 92.09% |

Three things in the box matter more than the net profit. First, 56 trades in six and a half years is a small sample, so the average trade of $1,592.05 carries wide uncertainty. Second, time in market of 92.09% means the rule was almost always holding a position, long or short, so part of what it captured is the direction ES travelled over those years, not turns called by the oscillator. Third, the max drawdown of $68,387.5 is close to the net profit in size. A reader should not conclude that this rule earned that money or that they can expect it; it is the best-looking member of a family of 1,024, chosen after seeing all the results, and Bailey et al. (2014) show that the best of many trials is inflated for that reason alone. Harvey and Liu (2015) make the same point and argue for discounting any result by the number of tests behind it.
The real judgement of MFI comes from a paired run that this result only sets up:
- Write the MFI 80/20 re-cross rule and the RSI 70/30 re-cross rule in full, same length of 14 bars, same exit.
- Run both on the same ES bars, the same session definition, the same period and the same in-sample and out-of-sample split.
- Charge the same commission and slippage and fill both on the next bar's open. AlphaPrime (Valynox) applies fees, slippage and next-bar execution inside every evaluation of its backtesting, which is what makes the MFI line and the RSI line of this comparison read on one scale.
- Compare average trade after costs first, then trade count, then max drawdown. Decide with a margin written before the run: for example, MFI must improve the out-of-sample average trade after costs by a stated amount with a similar number of trades.
If the two averages are close, the volume weighting added nothing on this market and bar size, and the simpler rule wins by default. If MFI is clearly better, the next question is whether the improvement survives the volume problems in the next section.
Is futures volume good enough for MFI across contracts?
MFI is only as good as the volume column under it, and futures volume breaks in three specific places: roll weeks on a continuous contract, thin night sessions, and micro contracts that share their market with the full-size contract. Each break distorts MFI in a different way, and none of them shows up in a price-only filter. The choppiness index, explained in choppiness index as a trend-or-range filter, never sees the volume column. An anchored VWAP, tested in eVWAP anchored VWAP rules on ES, uses volume only as a weight inside a running average, so a single odd bar barely moves it. A 14-bar sum ratio reacts to that same bar at full weight.
A continuous contract is a price series stitched from successive expiries so that a backtest can run across years. Around a roll, trading migrates from the expiring contract to the next one over several days. A series that switches on a single date shows volume fading on the old contract before the switch and jumping on the new one after it. MFI reads that fade and jump as selling pressure followed by buying pressure that never happened. How the roll is handled is covered in futures backtesting with contract specs and rollover; for MFI the extra step is to check the volume column, not only the price gap, across the roll week.
| Contract and session | Volume pattern | Effect on MFI |
|---|---|---|
| ES, day session | Steady, deep | Reliable; the reading reflects real pressure |
| ES, night session | Thin for long stretches | Spikes on small trades; false 80/20 crossings |
| MES (micro) | Shares its market with the full-size ES | Understates pressure when the flow is in the other contract |
| Continuous contract, roll week | Split between two expiries | False swings around the roll date |
| TAIEX futures, day vs night | Day deeper, night thinner | Day readings usable; night readings spike on small trades |
Three checks fix most of this before the backtest runs. Build MFI on the session you will trade, day-only or full-session, and keep the same choice for the RSI comparison. Build it on the contract whose volume you are using, so an MES strategy that uses ES volume is labelled as such. And look at the volume bars on each side of the last few roll dates in your series: if the column dips and jumps there, either roll on volume rather than on a fixed date or exclude the signal bars inside the roll week from the test.
One practical step follows from this. Open your ES or TAIEX futures bar data, find the most recent roll date, and compare the volume on the five bars before it with the five bars after it. If the two averages differ by more than the day-to-day variation around them, run the paired MFI-versus-RSI test from the previous section once with the roll weeks included and once with them removed, and keep whichever answer is worse.
Frequently asked questions
Can I use the money flow index on a chart without real volume?
No. MFI multiplies every bar's typical price by its volume, so a data feed with missing, tick-count or estimated volume produces an indicator that measures the feed's quirks rather than buying and selling pressure. If the volume column is missing or unreliable, use RSI, which needs only prices, and treat any MFI reading as undefined.
What length should MFI use?
The usual length is 14 bars, the same as RSI, and it is the right starting point for a first test. Shorter lengths make the line jumpier and produce more 80/20 crossings; longer lengths smooth it and produce fewer. Rather than searching for the best length, test a few neighbouring values and keep the rule only if the results for 12, 14 and 16 look alike.
Does MFI divergence predict a reversal?
MFI divergence is a price making a new high while MFI makes a lower high, or the mirror image at lows. It is a picture, not a rule, until you write down how far apart the two highs must be and what happens next. Written as a rule and tested against the plain 80/20 re-cross with the same costs and exit, divergence adds trades that are rarer and harder to define consistently, so compare average trade after costs on both before preferring it.
Is MFI better for daily bars or intraday bars?
MFI needs a volume column that reflects real participation on every bar, which daily bars on a liquid day session provide more consistently than intraday bars across night sessions. Intraday MFI works on deep sessions but spikes on thin ones, and a 14-bar window on 5-minute bars covers only about an hour of trading. Test the bar size you intend to trade and check the volume pattern of that session before reading the 80 and 20 levels.
References
- Wilder, J. W. (1978). New Concepts in Technical Trading Systems. Trend Research.
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.

