How to make a screenshot in MQL5 with ALIGN_RIGHT mode

 

Hi,


I've come to a bit of a hiccup. In 1 of my programs, I need to make automated chart screenshots. The function for that is:

ChartScreenShot(chartId, fileName, ss_width, ss_height, align_mode);

Prior to that I

ChartNavigate

to some time in history, where bars_navigated is much larger than visible_bars. I don't need the whole screenshot (whole display), so I set ss_width smaller than Chart_Width:

ChartGetInteger(0,CHART_WIDTH_IN_PIXELS,0);

If I set the alignment to ALIGN_LEFT, I will get a very nice screenshot of the left part of the screen with the specified "ss_width" pixel width.

However If I set ALIGN_RIGHT, I do not get the right part of the screen, but the right part of the complete chart (so it basically jumps to bar[0]) and makes a screenshot of youngest part of the chart.

So my question is: Is it possible to get a screenshot of the right part of the screen? 

I know one solution is to simply ChartNavigate less and align the chart to the left screen border and use ALIGN_LEFT with that but this solution is messy. And also I'm confused that ALIGN_RIGHT always jumps to Bar[0]; it makes it an ineffective tool.


Any pointer is appreciated.

 

Still looking for MQL5 based solution.

Currently using image tools to modify screenshots :)

 
aries:

Still looking for MQL5 based solution.

Currently using image tools to modify screenshots :)

I didn't experiment it, but as I understood your post and the documentation, that seems a bug (unless I misunderstood), so you should report it to ServiceDesk.
Documentation on MQL5: Chart Operations / ChartScreenShot
Documentation on MQL5: Chart Operations / ChartScreenShot
  • www.mql5.com
Chart Operations / ChartScreenShot - Reference on algorithmic/automated trading language for MetaTrader 5
 

Thank you very much, I was looking for that. I didn't find the bugzilla section before. 

BR

 

hi .

is there a way to take ScreenShots from just one timeframe?

my problem is I take ScreenShots of chart every one min and i change time frame during that time ...

i want to just take ScreenShots from m5 timeframe ...