Download MetaTrader 5

alternative to sendkey

To add comments, please log in or register
mrmedia
342
mrmedia  

There is

  long handle=ChartOpen("EURUSD",PERIOD_H1);
   if(handle!=0)
     {
      ChartSetInteger(handle,CHART_AUTOSCROLL,false);
      ChartSetInteger(handle,CHART_SHIFT,true);
      ResetLastError();
      bool res=ChartNavigate(handle,CHART_BEGIN,0);
      if(!res) Print("Navigate failed. Error = ",GetLastError());
      long mybar=ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0);
      ChartRedraw();
     }

but appears to be no way to do

  SendKey(VK_HOME,true);

Is it possible to force the chart to get more data left of first bar without using send key?

CChart?

To add comments, please log in or register