Skip to content

Positioning Constants

Positioning Constants

Three identifiers from the ENUM_CHART_POSITION list are the possible values of the position parameter for the ChartNavigate() function.

ENUM_CHART_POSITION

IDDescription
CHART_BEGINChart beginning (the oldest prices)
CHART_CURRENT_POSCurrent position
CHART_ENDChart end (the latest prices)

Example:

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();
     }
Last updated on