In the current implementation of the Money Flow Index (MFI), the extractSigns function is applied to the changes in the rawMoneyFlow array.
const rawMoneyFlow = multiply(typprice(highs, lows, closings), volumes);
const signs = extractSigns(changes(1, rawMoneyFlow));
const moneyFlow = multiply(signs, rawMoneyFlow);
As a result, the index rarely reaches the 20 or 80 thresholds typically used to signal overbought or oversold conditions.
In the more widely accepted definition of the MFI, as seen in Wikipedia, TradingView and Investopedia, the positive/negative signs are instead extracted from the Typical Prices.
const typicalPrices = typprice(highs, lows, closings);
const signs = extractSigns(changes(1, typicalPrices));
const rawMoneyFlow = multiply(typicalPrices, volumes);
const moneyFlow = multiply(signs, rawMoneyFlow);
This isn’t necessarily an error, but it might confuse some users.
In the current implementation of the Money Flow Index (MFI), the
extractSignsfunction is applied to the changes in therawMoneyFlowarray.As a result, the index rarely reaches the 20 or 80 thresholds typically used to signal overbought or oversold conditions.
In the more widely accepted definition of the MFI, as seen in Wikipedia, TradingView and Investopedia, the positive/negative signs are instead extracted from the Typical Prices.
This isn’t necessarily an error, but it might confuse some users.