Money Flow Index
is an oscillator which combines price and volume to indicate trends and reversals. Values above 80 could indicate that the stock is overbought. Values below 20 could indicate that the stock is oversold.
1. calculate Typical Price for each day as (High + Low + Close) / 3
2. calulate Money Flow for each day as Typical Price * Volume
3. for each day, if Typical < Typical-1 accumulate Negative Money Flow, otherwise accumulate Positive Money Flow
4. Money Flow Ratio = Positive Money Flow / Negative Money Flow
5. Money Flow Index = 100 - (100 / (1 + Money Flow Ratio)).