Using my EA which runs multicurrency, re-running same optimisation or even same test will randomly result with slight variation in results once or twice in 10 times. I can sometimes repeat several times in a row, same result comes, then suddenly i repeat again and slightly different result.
When i look at per trade results for a short sample, i notice this seems to come from taking different execution price for entering an order for the odd runs, even though it is executed at same exact time and i use market execution. See photo, highlighted in yellow are the transactions where there is the difference, you can see this doesnt happen for any other tx as well.
Also attached my order entry code in case it helps.
Looking for help to debug this, anybody aware of any known issues that can cause something like that?
Again to reiterate, the strangest part is it seems to happen randomly, i could run 3 runs that have the same result only to get the 4th with the slightly different result.
Any ideas or suggestions would be very much appreciated. If you need any further info, also happy to share.
Some basic info: its a multicurrency EA as you can see from the trades, running OnTimer per 1 sec, on real by tick data from broker
Additional info: if i run an optimisation, i get again a different in 1 out of every 10 runs, but then the slight difference will be in all the optimised values, for me that suggests that the issue could be data synch related but not sure how to solve that.
this is the code i use to load my symbol in the OnInit function, where the loadcheck function just stops the ea if there result is error and prints that. Am i doing something wrong here?
//CREATING LOOP TO INITIALISE INDICATOR ARRAYS FOR EACH SYMBOL for(int i=0; i<NumTradeableSymbols; i++) { // 1.0 GENERAL: LOADING SYMBOL bool loadSymbol = SymbolSelect(SymbolArray[i],true); LoadCheck(loadSymbol, SymbolArray[i], "load symbol"); }
It's not executed at the same time, but at the same second. Check the milliseconds of the tick at execution time.
Thanks Alain for the reply.
do you know a way to check the milliseconds of the tick at the execution time? (maybe i misunderstood the link you shared but couldnt find any explanation for that there)
It is still odd why would that specifically happen only on some trades and some simulations but not others.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Using my EA which runs multicurrency, re-running same optimisation or even same test will randomly result with slight variation in results once or twice in 10 times. I can sometimes repeat several times in a row, same result comes, then suddenly i repeat again and slightly different result.
When i look at per trade results for a short sample, i notice this seems to come from taking different execution price for entering an order for the odd runs, even though it is executed at same exact time and i use market execution. See photo, highlighted in yellow are the transactions where there is the difference, you can see this doesnt happen for any other tx as well.
Also attached my order entry code in case it helps.
Looking for help to debug this, anybody aware of any known issues that can cause something like that?
Again to reiterate, the strangest part is it seems to happen randomly, i could run 3 runs that have the same result only to get the 4th with the slightly different result.
Any ideas or suggestions would be very much appreciated. If you need any further info, also happy to share.
Some basic info: its a multicurrency EA as you can see from the trades, running OnTimer per 1 sec, on real by tick data from broker