Incorrect Chart Dimensions When Switching Charts

To add comments, please log in or register
Ex Ovo Omnia
3359
Ex Ovo Omnia  

I have problem with detecting the correct chart dimensions when switching the maximised charts.

When the chart window is maximised, and then I click to another chart tab, then the CHARTEVENT_CHART_CHANGE event is fired. However, in the OnChartEvent() execution the chart dimensions are shorter than the actual size of the current maximised window (like if the window were not maximised).

It is causing me troubles, as I want to keep my graphics objects in the visible area of the chart, so I unintentionally move them on this event.

Is there any MQL other way to prevent using those incorrect dimensions?

Marco vd Heijden
Moderator
8168
Marco vd Heijden  

I know what you mean, i also ran into it many times.

Maybe this only happens when charts are fully maximized so you could try to stack the charts on top of each other, but not maximized.

At least that is how i used to take screenshots without having these issues you describe, but since then i have not been using it anymore.

Ex Ovo Omnia
3359
Ex Ovo Omnia  
Marco vd Heijden:

I know what you mean, i also ran into it many times.

Maybe this only happens when charts are fully maximized so you could try to stack the charts on top of each other, but not maximized.

At least that is how i used to take screenshots without having these issues you describe, but since then i have not been using it anymore.


Thank you for the tip. I thought about it in more consequences and I decided to forget about attempts finding a solution. Even using the winapi functions would not solve it 100%, so I have to live with it.

Marco vd Heijden
Moderator
8168
Marco vd Heijden  

You can connect to Google API then you can free yourself from the mql limitations and issues and then you can expand the possibilities.

The images are rendered in the browser as SVG and so you only transfer a few kilobytes of raw data to the browser and you can capture the image as PNG by copying a base64 URI.

Another nice extra is that the images will be inter-active.
To add comments, please log in or register