double
iMA(
string symbol, int timeframe, int period, int ma_shift, int ma_method,
int applied_price, int shift)
Calculates the Moving average indicator and returns its value.
Parameters
symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe - Time frame. It can be any of Time frame enumeration values.
period - Number of periods for calculation.
ma_shift - MA shift. Indicators line offset relate to the chart by timeframe.
ma_method - MA method. It can be any of the Moving Average method enumeration value.
applied_price - Applied price. It can be any of Applied price enumeration values.
shift - Shift relative to the current bar (number of periods back), where the data should be taken from.
Sample
Valor media movil =iMA(NULL,0,20,0,MODE_SMMA, PRICE_MEDIAN,i);
Archivo adjunto 46139
Gracias a dropbox puedo subir el manual de usuario del meta.
Si en el ultimo parametro (i), ponemos 1, el valor de la media móvil sera el que hay en la vela1( la ultima que se ha cerrado), si en i ponemos 2 devuelve el valor de la media en la vela anterior a la 1 etc.
Espero que te sirva.
Saludos