NinjaScript > Language Reference > Indicator Methods >

Money Flow Index (MFI)

Print this Topic Previous pageReturn to chapter overviewNext page

Description

The Money Flow Index (MFI) is a momentum indicator that is similar to the Relative Strength Index (RSI) in both interpretation and calculation. However, MFI is a more rigid indicator in that it is volume-weighted, and is therefore a good measure of the strength of money flowing in and out of a security.

 

... Courtesy of StockCharts

 

 

Syntax

MFI(int period)
MFI(IDataSeries input, int period)

 

Returns default value
MFI(int period)[int barsAgo]
MFI(IDataSeries input, int period)[int barsAgo]

 

 

Return Value

double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.

 

 

Parameters

input

Indicator source data (?)

period

Number of bars used in the calculation

 

 

Examples

// Prints the current value of a 20 period MFI using default price type
double value = MFI(20)[0];
Print("The current MFI value is " + value.ToString());

 

 

Source Code

You can view this indicator method source code by selecting the menu Tools > Edit NinjaScript > Indicator within the NinjaTrader Control Center window.