QuantStudio Financial Data Analysis and Trading Framework

MFI Class

Money Flow Index (MFI)

For a list of all members of this type, see MFI Members.

System.Object
   RQuant.Indicator.TTimeArray
      RQuant.Indicator.TDoubleArray
         RQuant.Indicator.TIndicator
            RQuant.Indicator.MFI

[Visual Basic]
Public Class MFI
    Inherits TIndicator
[C#]
public class MFI : TIndicator

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The Money Flow Index is a momentum indicator used to measure the strength of money flowing in and out of an asset. The MFI is closely linked to the Relative Strength Index (RSI), though the MFI additionally accounts for volume action, whereas the RSI includes price action only.

First of all, the money flow (but not the Money Flow Index) is calculated. The average price for the day is determined and then compared with the average price of the previous day. If today?s money flow is larger, a positive money flow is assumed; if it is smaller, a negative money flow is assumed, i.e. a money outflow. The money flow for a specific day is then calculated by multiplying the average price by the volume. Finally the Positive Money Flow is calculated as a sum of the money inflows over a specified number of time periods. The Negative Money Flow is calculated as the sum of money outflows over a specified number of time periods. After this, the Money Flow Index is calculated with the equivalent formula of the RSI.

The Money Flow Index is not currently applicable for Intraday charts and will never be applicable for Tick charts, due to the nature of the data.

This indicator is described in more details in the Steve Achelis' book "Technical Analysis from A to Z".

Formula:

Example

TDataManager.cd("Demo");

TDailyArray Daily1 = TDataManager.GetStock("YHOO").DailyArray;

DateTime Date1 = DateTime.Parse("1999/02/08"); 
DateTime Date2 = DateTime.Parse("2000/12/29"); 

TDailyArray Daily = Daily1.Clone(Date1, Date2);

TCanvas Canvas = new TCanvas("Canvas","MFI DEMO",600,400);
    
Canvas.Divide(1,2);

MFI MFI = new MFI(Daily, 14);

Canvas.cd(1);
Daily.Draw("c");

Canvas.cd(2);
MFI.Draw(Color.Red);

Requirements

Namespace: RQuant.Indicator

Assembly: RQuant.Indicator (in RQuant.Indicator.dll)

See Also

MFI Members | RQuant.Indicator Namespace