Money flow index
All indicators

LibraryVolume

Indicator

Money flow index

A volume weighted RSI: how much money flowed on bars with a rising typical price against all the money that flowed, on a scale from 0 to 100.

VolumeOwn pane1 inputMFI

How it is calculated

As TA-Lib's MFI (Quong and Soudack 1989): money flow is the typical price (high plus low plus close, divided by 3) times volume, positive when the typical price rose against the bar before, negative when it fell, neither when it held. MFI is 100 times the positive flow over positive plus negative flow, each summed over the length; the first value is at bar length. A window with no flow at all gives 0, as TA-Lib does.

Reference: TA-Lib MFI (Quong and Soudack 1989)

How to read it

Above 80 the market is often called overbought, below 20 oversold. Like RSI it can stay there in a strong trend, so a turn back across the line and divergences against price say more than the level. On forex the volume is tick volume, which weights busy bars more, not larger orders.

In a strategy

A mean reversion entry when ctx.ind("mfi", length=14) crosses back above 20, compared with the value a bar earlier, or a filter that allows no longs above 80.

Inputs

InputTypeDefaultRange or choices
LengthlengthWhole number14min 2, max 5000

What it draws

LineDrawn as
MFILine

Moves between 0 and 100. Guide lines at 20, 80.

Used in

No strategy template reads it yet.

OrionQuant