ima()
Previous  Next

ima calculates the Moving Average indicator and returns its value.

double ima(
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
);

Parameters:

timeframe
[in] Timeframe in minutes. It can be one of the period constants.

ma_period
[in] Averaging period for calculation.

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

ma_method
[in] Moving Average method. It can be any of the mode constants.

applied_price
[in] Applied price. It can be any of the applied price constants.

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

Example:
AlligatorJawsBuffer[i]=ima(1440,13,8,MODE_SMMA,PRICE_MEDIAN,i);