study(title="Money Flow", shorttitle="MFI")
length = input(title="Length", type=integer, defval=14, minval=1, maxval=2000)
src = hlc3
upper = sum(volume * (change(src) <= 0 ? 0 : src), length)
lower = sum(volume * (change(src) >= 0 ? 0 : src), length)
mf = rsi(upper, lower)
overbought=hline(80, title="Overbought", color=#c0c0c0)
oversold=hline(20, title="Oversold", color=#c0c0c0)
fill(overbought, oversold, color=#9915ff, transp=90)
The only new thing mine does is highlight overbought and oversold more effectively.
Clearly oversold on one of them.
Typical Price = (High + Low + Close)/3
Raw Money Flow = Typical Price x Volume
Money Flow Ratio = (14-period Positive Money Flow)/(14-period Negative Money Flow)
Money Flow Index = 100 - 100/(1 + Money Flow Ratio)
RSI = 100 - --------
1 + RS
RS = Average Gain / Average Loss
These two are not closely related enough to have a straightforward connection. The MFI is sometimes referred to as "volume-weighted RSI" but their formulas are very different.
Thank so much you seiglerj for the quick response,