MetaTrader 5 Strategy Tester: bugs, bugs, suggestions for improvement - page 16
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
If these are the correct formulas
The Tester calculates these figures very differently. I have striking differences in the results between these formulas and what the Tester shows (apart from the profit).
I suggest that we get to the bottom of this. The snag is exactly what MT5 considers a profitable trade.
Remove one, or both at once, and compare.
Or here (if above does not help) remove "="
What are we discussing now? Disabling agents or allowing characters to be used in testing/optimisation?
If there are two problems, we should probably discuss and solve both. Or is it impossible ?
1. Why there is a disabling of agents after optimization is done.
2. What is the reason why the automatic addition of characters to the tester is stopped?
Remove one, or both at once, and compare.
Or here (if above doesn't help) remove "="
This is how MT5 works out
I.e. in MT5 you can close a position and get a loss (the balance before opening is less than the balance after closing). But in this case the MT5-Tester (terminal has not checked) will consider this trade as profitable.
For example, MT5_PF = 1.89 and MT4_PF = 2.01.
If these are the right formulas
The Tester calculates these figures very differently. I have striking differences in the results between these formulas and what the Tester shows (except for the profit).
I propose to make it clear. The snag is what MT5 considers a profitable trade.
Why is there a const modifier here ?
When this variable leaves scope, it will probably be re-initialized... imho, const is not needed
If we remove OrderCommission() + OrderSwap() ? - we're talking about profit on trades, not commission ?
SZZ: as an option, the tester can work with the balance, if the order is closed, the balance has changed, compare it with the old balance, in general, i can't guess.... , i have not found the source, but there is an articlehttps://www.mql5.com/ru/articles/4226 with the same profit calculation, but i haven't read it.
Why is there a const modifier here?
You need to calculate the Profit variable at all iterations of the loop , although it's possible that when this variable leaves the scope, it will be re-initialized... imho, you don't need const.
It will be recreated. Everything is correct there.
What if I remove OrderCommission() + OrderSwap() ? - we are talking about profit by trades, not by commission ?
MT5 formula is given above. This creates serious distortions when calculating the PF of scalping TSs. And how can it be that PF depends on the platform? It has to be unambiguous.
This problem has already been raised by me in earlier builds branches. It was never fixed. Found my crutch. I disable some of the agents (3 of 10 in my case) and enable them after 0 iteration, and everything goes fine. Sometimes, though, some agents do stop in the process, but rarely, the solution algorithm is the same.
It's a pity, but manual steering is not an option. I have automatic optimisation.
If there are two problems, perhaps both should be discussed and solved. Or is that impossible?
1. Why agents are disconnected after optimisation.
2. What is the reason why the automatic addition of characters to the tester is stopped?
1. See the tester logs, it's all there.
2. it's already fixed. But until you have a build with fixes, you can use drag-drop (we didn't discuss why character addition stopped, we discussed how you can still test in these conditions)
I run single runs alternately on each custom symbol. From a certain point it is impossible to see the path to them in the Tester, but they are still selectable via drag and drop from the Market Watch. Then after a while this doesn't work either: you can select either a normal symbol, or only one custom symbol. The others are not possible. The animation below shows this situation.
1. See the tester logs, it's all there.
2. it's already fixed. But until you have a build with fixes, you can use drag-drop (we didn't discuss why character addition stopped, we discussed how you can still test in these conditions)
During genetic optimization I use a lot of parameters. As soon as number of variants becomes so large that it shows up in scientific notation (6.8768769e+21), optimization continues with half of agents (4 out of 8) after generation 0. No mention of this in the logs. Optimization itself runs fine, but with half load, twice as long.
The behaviour is not always reproduced, which may be why it is not being corrected. Yesterday I had it, today I don't. Maybe it depends on the EA too. I have it with frames. The size of ex5 is about 0.5 Mb. I have 8 Gb of memory. Intel i7, 4 cores, 8 threads. Divorced. Unsupervised.