Why is ChartWidthInPixels() giving different results?

Back to topics list To post a new topic, please log in or register
avatar
9
Philb1 2016.07.10 04:33
 

Hello

Can someone tell me why the chart width is 1628 pixels wide when MT4 is opened, and after compiling, it is 1861 pixels wide using the same code. To see it I'm using Comment(ChartWidthInPixels());


Thanks

int ChartWidthInPixels(const long chart_ID=0)// Get chart width in pixels function
  {
//--- prepare the variable to get the property value
   long result=-1;
//--- reset the error value
   ResetLastError();
//--- receive the property value
   if(!ChartGetInteger(chart_ID,CHART_WIDTH_IN_PIXELS,0,result))
     {
      //--- display the error message in Experts journal
      Print(__FUNCTION__+", Error Code = ",GetLastError());
     }
//--- return the value of the chart property
   return((int)result);
  }
Back to topics list  

To add comments, please log in or register