Problem with ChartscreenShot

To add comments, please log in or register
Martin Moreno
143
Martin Moreno  

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                                             |...
Keith Watford
Moderator
20313
Keith Watford  
What width and height are you putting in the function parameters?
Martin Moreno
143
Martin Moreno  
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);


Keith Watford
Moderator
20313
Keith Watford  
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

Martin Moreno
143
Martin Moreno  
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!

To add comments, please log in or register