Money Flow Persistence Meter
A single Money Flow Index print above 50 says money flow was positive on that one bar. It says nothing about whether that is a fresh, one-bar wobble or the fifteenth bar of an extended one-sided stretch - and those two situations usually call for a different level of confidence in the underlying trend. This indicator turns the raw MFI value into a persistence count: every bar the index stays above 50, the bullish streak count grows by one; every bar it stays below 50, the bearish streak count grows by one; the moment it crosses back through 50 the count resets to one and starts again on the other side. The result reads like a "how long has this been one-sided" meter rather than an oscillator level. A count that keeps climbing means money flow has stayed on one side for a genuinely long stretch, independent of how far above or below 50 the raw MFI value happens to sit on any single bar. A count that keeps resetting to one or two means the index is chopping back and forth across 50 without building any real persistence. Since each bar's streak count depends on the previous bar's count, this is built as a forward running recurrence - the same technique this catalogue uses for OBV and VPT - so history only needs computing once and each new bar simply extends or resets the count already on record. Notes and limitations - iMFI() uses broker tick volume as its volume input on MetaTrader 4, the same substitute every volume-based tool in this catalogue uses for FX/CFDs. - The streak count has no upper bound - a genuinely long one-sided stretch will keep climbing indefinitely and can dwarf the visual scale of a typical streak. No cap or rescaling is applied; adjust the subwindow's vertical scale manually if a single very long streak makes earlier, shorter streaks hard to read. - The forming (rightmost) bar's count is recomputed on every tick as MFI itself moves, so the very last bar's streak length can still change until that bar closes. - Needs InpMfiPeriod + 2 bars of history before the histogram starts plotting.
Indicator · MT5 · v1.0 · Free
About Money Flow Persistence Meter
Money Flow Persistence Meter is an indicator for MetaTrader 5. It has 1 setting, such as Mfi period. MQL source code included.
Files in the download: MoneyFlowPersistence.ex5, MoneyFlowPersistence.mq5, MoneyFlowPersistence.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Mfi period | 14 | Money Flow Index period |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Trend · MT5 Indicator · MQL5 Source Code