
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 you make several optimisations, with the same parameters of the EA, do the results of different optimisations coincide? if they do, then the problem is in the difference between the optimiser and the single pass. if they do not - then the problem is definitely in the EA's code.
Let me explain - the trendy writing here in the :
if (condition) {
} else if (!condition) {
}
supposedly increasing readability and understanding of the code, is actually an evil
and plus you have to work very, very carefully with double
Do you think that a global EA variable retains its value from past optimiser runs and is carried over to the next ones?
Yes, that's about right. I was trying to do that.
Only it was not just a global variable but a static class member or a terminal variable or something else.
Moreover, a single test immediately after launching the terminal and a repeated one on the same agent can be different. For the same reason.
All in all, you need to initialize everything and keep a scrupulous eye on it.
ps: no, that reminds me. I was fine with initialization, it was one of the builds that initialized statics glitchily. Got it fixed promptly.
any transfer of EA variable contents from one run to another should be considered as a bug of the tester, even if it concerns global variables of the terminal.
If there are several copies of one EA running on charts in real time, the user uses a mage or other ways of identification, and the optimization process implies multiple and independent of each other runs of one EA with the same mage, if it is not so, then not only it is wrong from the ideological point of view of optimization, but it opens the possibility to influence the optimization and abuse the market products by misleading the buyer.
Waiting for TC's report on unpruned deals, intrigue though.
Not set up for a holy thief.
The point, as always, is simple - the EA is not unloaded to optimize faster. EX files can be large.
Only today I had time to get to grips with the problem. I decided to start small. One thing at a time. Including checking opened files. The code is as follows:
I've run optimization and then a single test. As a result, I got two files:
I opened these two files in the WinMerge program. And this is what I saw there
There is a problem with opening files in the optimizer. Note that there is no such error in the tester!
There is a problem with the optimiser opening files. Note that there is no such error in the tester!
Several cores open the file at the same time. One opens, the rest get screwed up.
Need code with waiting, or at least FILE_SHARE_READ flag
If you:
Several cores open the file at the same time. One opens, the others get screwed.
I need code with waiting, or at least FILE_SHARE_READ flag
Well, I didn't write the code specifically for the optimizer. It was expected that the optimizer would already be aware of such nuances. I'll try to add a flag, it won't make it worse. )))
If you:
Since there is still no code, the testing conditions are not described in any way, and you are making clearly erroneous statements, then deal with it yourself.
If you cannot even open files, it means that there are many problems in the Expert Advisor.
You have even hidden the names of these files.
Since there is still no code, the testing conditions are not described in any way, and you are making clearly erroneous statements, then deal with it yourself.
If you cannot even open files, it means that there are many problems in the Expert Advisor.
You have even hidden these file names.
There is no code because adding the balloon really solved the problem. Now the optimisation results and single runs are fully consistent.
It's just that I hardly used files in EAs before (at least all writing/reading during optimization/testing was disabled), but thought the optimizer solved the issue of access from a single EA.