OPEN-SOURCE SCRIPT

Money Flow Line

What is this? The Money Flow Line (MFL) indicator is at its core a more even-tempered version of the Price-Volume-Trend (PVT). The primary difference is the usage of `hlc3` ((high + low + close) / 3) rather than `close` to use the "typical price" that it critical to the calculation of the Money Flow Index (MFI). Other similar indicators include the Accumulation Distribution Line (ADL) and the On Balance Volume (OBV) indicators. The purpose of all of these indicators is to attempt to measure the strength of the money flow by combining price and volume into a rolling measurement that can be compared over time to look for confirmations and divergences.

The indicator also includes an optional averaging (smoothing) line that can be enabled in the display settings. Enabling this smoothing line with a desired period allows for simpler trend comparisons and also allows the user to view how far the line has diverged from the mean. This creates an indicator very similar to Elder's Force Index (EFI), which is also a `close * volume` style indicator.

Why is this important? After an extreme movement or volume spike the MFI will "snap back" sharply as that bar eventually exits the set period. This produces a result that is meaningless and skews the indicator away from the market structure. Because of this behavior, range clamping, and the loss of comparative history I prefer to shy away from oscillator style indicators. The Money Flow Line instead gives you all of the history so you may compare and see the broader trend without sharp snaps in history based on an arbitrary period setting.

Why is this better? This produces a no-lag indicator that isn't subject to the harsh skewing produced by they Money Flow Index's period calculation. It doesn't lose history like MFI or EFI, is clear about the trend direction, and prefers a "typical price" (averaging the entire range of each bar) rather than whatever happens to be the closing price for a given bar.

How can I use it? The indicator is attempting to measure supply and demand in the markets. No indicator is perfect, but we can use all of the information we have available to make our best predictions. There are only 3 pieces of data the market gives us:

1. Price (action)
2. Volume
3. Time

The Money Flow Line combines all of these data points into a readable rolling data set that attempts to show subtle balance of power shifts based on changes in volume and "smart money" (or "big money") stepping in and out of the picture. Much like PVT, we look for the same things:

- Trend Identification: an up or down trend appears in the MFL
- Confirmations: the MFL agrees with price action in direction and magnitude
- Divergence: the MFL disagrees with price action, indicating a reversal may be coming soon

When applying the smoothing line we can also look for similar things we would with EFI. The primary case would be to look for the MFL to jump very far away from the mean (a high magnitude movement) which indicates that price may be reverting towards the mean soon (a "mean reversion"). On the other hand, it may indicate strength in the current price direction. All of these predictions depend heavily on price action and market structure. Good luck!
accumulationdistributionFLOWforcemoneyMoney Flow Index (MFI)Price Volume Trend (PVT)supply_and_demandvolumepriceanalysisVolume

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer