Money Flow Index
The Money Flow Index (MFI) is very similar to the Relative Strength Index (RSI) in that it measures the strength of money flowing in and out of a security. The only difference is that MFI incorporates volume action.
x is the period which must be an integer.
A formula for a 20 period Money Flow Index can be written as follows.
100 * SUM(IIF(H + L + C > H1 + L1 + C1, (H + L + C) * V, 0), 20) / SUM((H + L + C) * V, 20)