Problem with ChartscreenShot

 

Hi guys,

I use Chartscreenshot() to take screen  of my chart but I have problem with width and height of taken pictures. 

As you can see dimension of picture is small. Do you have any idea to fix the problem ?

(All windows of MetaTrader such as Terminal, Mrket-watch and Navigator are closed during take screenshot.)

Documentation on MQL5: Chart Operations / ChartScreenShot
Documentation on MQL5: Chart Operations / ChartScreenShot
  • www.mql5.com
"The Expert Advisor demonstrates how to create a series of screenshots of the current" "shown on the chart. The height and width of images is defined through macros." //| Expert initialization function                                   | //| Expert tick function                                             |...
 
What width and height are you putting in the function parameters?
 
Keith Watford:
What width and height are you putting in the function parameters?

  int width  = (int)ChartGetInteger(0, CHART_WIDTH_IN_PIXELS);

  int height = (int)ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS);


 
Martin Moreno:

  int width  = (int)ChartGetInteger(0, CHART_WIDTH_IN_PIXELS);

  int height = (int)ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS);


Please show the whole section of code as I can't see why those should be returning 167 and 94

 
Keith Watford:

Please show the whole section of code as I can't see why those should be returning 167 and 94

Thanks. I fixed the width and height to specified pixel. So it works!

Reason: