Algorithmic Trading Strategy Using Money Flow Index (MFI) & Python

randerson112358
10 min readOct 3, 2020

Use MFI to know when to buy and sell stock

Disclaimer: The material in this article is purely educational and should not be taken as professional investment advice. Invest at your own discretion.

In this article, I will attempt to create a trading strategy called Money Flow Index (MFI). The MFI is also known as volume-weighted RSI and it is an oscillator that uses price and volume data for identifying overbought or oversold signals in an asset.

A Money Flow Index (MFI) level above 80 is considered overbought which is an indication to (sell) and a level below 20 is considered oversold which is an indication to (buy). Also note that levels of 90 and 10 are also used as thresholds.

if MFI > 80 then Sell
if MFI < 20 then Buy

Calculating the Money Flow Index:

When calculating the Money Flow Index, you want to first calculate the typical price. The typical price indicates an average of each days price. The calculation takes the current high price plus the current low price plus the current close price and divides it by three.

typical price = (high + low + close) / 3

--

--

Responses (4)