indicator · own pane · open source
Money Flow Index
Running…
Loading chart…
About
Money Flow Index (MFI) is a volume-weighted RSI — positive money flow over negative money flow, scaled to 0-100. Picks up accumulation/distribution that RSI alone misses.
- Above 80 = overbought, below 20 = oversold.
- Divergences with price are high-quality reversal signals.
- Raise
Lengthto filter noise in chop.
Source code
//@version=5
indicator("Money Flow Index", overlay=false)
len = input.int(14, "Length", minval=2, maxval=200)
src = input.source("close", "Source")
mfi = ta.mfi(src, len)
hline(80, "Overbought", color=color.gray, linestyle=hline.style_dashed)
hline(20, "Oversold", color=color.gray, linestyle=hline.style_dashed)
p_MFI = plot(mfi, "MFI", color=color.navy, linewidth=2)
alertcondition(ta.crossunder(mfi, 20), "MFI oversold", "MFI crossed below oversold")
alertcondition(ta.crossover(mfi, 80), "MFI overbought", "MFI crossed above overbought")
No comments yet.
Sign in to comment.