Pine Script (TradingView)
Este e um exemplo de Pine Script do TradingView para este indicador. Cole no Pine Editor do TradingView, adicione ao grafico e ajuste os parametros para seu mercado e timeframe.
//@version=6
indicator("Money Flow Index (MFI)", overlay=false)
length = input.int(14, "MFI Length")
mfi = ta.mfi(hlc3, length)
longSignal = ta.crossover(mfi, 20)
shortSignal = ta.crossunder(mfi, 80)
plotshape(longSignal, style=shape.triangleup, location=location.bottom, color=color.green, size=size.small)
plotshape(shortSignal, style=shape.triangledown, location=location.top, color=color.red, size=size.small)
hline(80, "Overbought", color=color.red, linestyle=hline.style_dashed)
hline(50, "Mid", color=color.gray, linestyle=hline.style_dotted)
hline(20, "Oversold", color=color.green, linestyle=hline.style_dashed)
plot(mfi, "MFI", color=color.new(color.teal, 0))