MQL4 Reference Technical Indicators iMFI

iMFI

Calculates the Money Flow Index indicator and returns its value.

double  iMFI(
   string       symbol,     // symbol
   int          timeframe,  // timeframe
   int          period,     // averaging period
   int          shift       // shift
   );

Parameters

symbol

[in]  Symbol name on the data of which the indicator will be calculated. NULL means the current symbol.

timeframe

[in]  Timeframe. It can be any of ENUM_TIMEFRAMES enumeration values. 0 means the current chart timeframe.

period

[in]  Period (amount of bars) for calculation of the indicator.

shift

[in]  Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Returned value

Numerical value of the Money Flow Index indicator.

Example:

  if(iMFI(NULL,0,14,0)>iMFI(NULL,0,14,1)) return(0);