Questions from Beginners MQL5 MT5 MetaTrader 5 - page 619

 

Who can explain why when I make a screenshot of a graph using the"ChartScreenShot()" function There are some graphical elements missing:

Well this is done by hand:

 
Vitaly Muzichenko:

Can someone explain why when I make a screenshot of a graph using the "ChartScreenShot()" function There are some graphical elements missing:

Well this is done by hand:

And how often are these objects updated from your code? By any chance at a gigahertz frequency (or so)?
 
Karputov Vladimir:
And how often these objects are updated from your code? Not at gigahertz frequency by any chance (or so)?

No, now the market is not working at all, i.e. no ticks, I ran the"ChartScreenShot" functionwith a script.

And so they are updated at every tick, but not now. The script is simple, just create a screenshot and that's it, 3 lines of code.

 
Vitaly Muzichenko:

No, now the market is not working at all, i.e. no ticks, I ran the"ChartScreenShot" functionwith a script.

And so they are updated at every tick, but not now. The script is simple, just creating a screenshot and that's it, 3 lines of code.

My thought is: object update is an asynchronous command, i.e. you send a command, but the result of execution (or execution speed) is undefined. If you take a screenshot at such a moment, you can catch the moment when not all objects are redrawn.
 
Karputov Vladimir:
My thought is: object update is an asynchronous command, i.e. you send a command, but the result of execution (or execution speed) is undefined. If you take a screenshot at such a moment, you can catch the moment when not all objects are redrawn.
I have already made more than fifty screenshots, the effect is always the same, the same objects are never there.
 
Vitaly Muzichenko:
I have already made more than fifty screenshots, the effect is always the same, the same objects are never there.
Have you tried removing all indicators and EAs and taking a screenshot?
 
Vitaly Muzichenko:
I've already made more than fifty screenshots, the effect is always the same, the same objects are never there.
I've encountered this problem. There are vertical lines on the chart delimiting the desired bar ranges. It was necessary to have all the available history in the screenshots. Some vertical lines were missing in the screenshots. I have not managed to find the reason. First, two lines were put that delimit the range, then the chart was shifted to have both lines near the screen edges and a screenshot was made. Sometimes one of the two lines was missing. I think Vladimir is right about asynchrony.
 
Artyom Trishkin:
I have encountered such a problem. There are vertical lines on the chart that delimit the desired bar ranges. It was necessary to screen all the available history. Some vertical lines were missing in the screenshots. I have not managed to find the reason. First, two lines were put that delimit the range, then the chart was shifted to have both lines near the screen edges and a screenshot was made. Sometimes one of the two lines was missing. I think Vladimir is right about asynchrony.

Yes I have already drawn a lot of objects, and not once have I seen the same ones, indicated them on the screenshot. Those objects are drawn by the indicator, it draws a lot, and these two are never there :)

Some objects are shifted by 5-7pp, how to fight this?

So what can be the way out of the situation to sketch the missing ones?

 

I have a suspicion that the pixelation of the original and copy is changing. Look - you have these objects at the edges and the font size of the EA name seems to be different. Are your objects out of frame by me?

Move the objects to the centre with your pens and repeat the screenshot operation again - will the screenshot work?

 
new-rena:

I have a suspicion that the pixelation of the original and copy is changing. Look - you have these objects at the edges and the font size of the EA name seems to be different. Are your objects out of frame by me?

Move the objects to the centre with your pens and repeat the screenshot operation again.

Geez, how come it's more likely that the object is pixel bound rather than price and time bound.

Here's a stump of it peeking out, but in the original it's below the middle of the chart, and shifted to the left by half of the chart:


Thank you, the object has been found, the task remains to screen it where it is in the original) All the other objects are almost in place.

Reason: