█ Description
Money flow an indexed value-based price and volume for the specified input length (lookback period). In summary, a momentum indicator that attempt to measure the flow of money (identify buying/selling pressure) through the asset within a specified period of time. MFI will oscillate between 0 to 100, oftentimes comprehend the analysis with oversold (20) or overbought (80) level, and a divergence that spotted to signaling a further change in trend/direction. As similar to many other indicators that use length (commonly a fixed value) as an input parameter, can be optimized by applied an adaptive filter (Ehlers), to solve the measuring cycle period. In this indicator, the adaptive measure of dominant cycle as an input parameter for the lookback period/n, will be applied to the money flow index.


█ Money Flow Index

mfi = 100 - (100/(1 + money_flow_ratio))
where:
n = int(dominant_cycle)
money_flow_ratio = n positive raw_money_flow / n negative raw_money_flow
raw_money_flow = typical_price * volume
typical_price = hlc3


█ Feature
  • The indicator will have a specified default parameter of: hp_period = 48; source = ohlc4
  • Horizontal line indicates positive/negative money flow
  • MFI Color Scheme: Solid; Normalized
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?