top of page

MQL4 Reference / Technical Indicators / iMA


Calculates the Moving Average indicator and returns its value.

double  iMA(
  string       symbol,           // symbol
  int          timeframe,        // timeframe
  int          ma_period,        // MA averaging period
  int          ma_shift,         // MA shift
  int          ma_method,        // averaging method
  int          applied_price,    // applied price
  int          shift             // shift



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


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


         [in]  Averaging period for calculation.


         [in]  MA shift. Indicators line offset relate to the chart by timeframe.


         [in]  Moving Average method. It can be any of ENUM_MA_METHOD enumeration values.


         [in]  Applied price. It can be any of ENUM_APPLIED_PRICE enumeration values.


         [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 Moving Average indicator.



Page 1 of 3

bottom of page