Posicionamiento de gráfico

Tres identificadores de la lista ENUM_CHART_POSITION son posibles valores del parámetro position para la función ChartNavigate().

ENUM_CHART_POSITION

Identificador

Descripción

CHART_BEGIN

Inicio del gráfico (precios más viejos)

CHART_CURRENT_POS

Posición actual

CHART_END

Fin del gráfico (precios más recientes)

Ejemplo:

   long handle=ChartOpen("EURUSD",PERIOD_H12);
   if(handle!=0)
     {
      ChartSetInteger(handle,CHART_AUTOSCROLL,false);
      ChartSetInteger(handle,CHART_SHIFT,true);
      ChartSetInteger(handle,CHART_MODE,CHART_LINE);
      ResetLastError();
      bool res=ChartNavigate(handle,CHART_END,150);
      if(!res) Print("Navigate failed. Error = ",GetLastError());
      ChartRedraw();
     }