API documentation for pandas_ta.volume.mfi Python function.

mfi(high, low, close, volume, length=None, talib=None, drift=None, offset=None, **kwargs)[source]#

Money Flow Index (MFI)

Money Flow Index is an oscillator indicator that is used to measure buying and selling pressure by utilizing both price and volume.


Default Inputs:

length=14, drift=1

tp = typical_price = hlc3 = (high + low + close) / 3 rmf = raw_money_flow = tp * volume

pmf = pos_money_flow = SUM(rmf, length) if tp.diff(drift) > 0 else 0 nmf = neg_money_flow = SUM(rmf, length) if tp.diff(drift) < 0 else 0

MFR = money_flow_ratio = pmf / nmf MFI = money_flow_index = 100 * pmf / (pmf + nmf)


high (pd.Series): Series of ‘high’s low (pd.Series): Series of ‘low’s close (pd.Series): Series of ‘close’s volume (pd.Series): Series of ‘volume’s length (int): The sum period. Default: 14 talib (bool): If TA Lib is installed and talib is True, Returns the TA Lib

version. Default: True

drift (int): The difference period. Default: 1 offset (int): How many periods to offset the result. Default: 0


fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method


pd.Series: New feature generated.