Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1588
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Yes, it can feel a bit crazy compared to MT4, but there is a reason for it, the rendering is asynchronous.
Yes, compared to MT4 it may seem a bit odd, but there is a reason for that, the rendering is asynchronous.
We should not look for the cause, but for a solution.
If the asynchronous nature is the cause, then there is no real "fix".
If asynchrony is the cause, there is no real "fix".
From the screenshot
Get the result of the function into a variable, and spin it in while?
Don't forget about IsStopped())
The question was about the tester, slip and timer don't work. Reaching even the local comp time is a problem. Return true on execution would be good.
From the screenshot
Get the result of the function into a variable, and spin it in while?
Don't forget about IsStopped())
Yes, a while with IsStopped() can work, but since it is active waiting it can stay at 100% CPU during the wait, in the visual tester it is more efficient and safer to use OnTimer() with several ChartRedraw(), and validate the file to make sure the capture is complete.
Let us remember what we are talking about (It is what I base everything I say on):
Forum on trading, automated trading systems and testing trading strategies
Questions from Beginners MQL5 MT5 MetaTrader 5
Nauris Zukas, 2025.08.13 14:15
Does the ChartScreenShot() function work reliably in MetaTrader 5 Strategy Tester's visual mode? The documentation does not mention any limitations, but I'm getting blank images. Has anyone experienced this or found a solution?
I haven't tried it myself, I only suggested it, I think people had empty files in the tester,
There were empty files in wine, you can search for them.From the screenshot.
Get the result of a function into a variable and spin it in while?
Don't forget about IsStopped())
I tried it, while while while is spinning - the programme dies and no screenshot is created.
Hey, everybody,
That's not right.
right
a_position.PositionType()