The situation is as follows: the strategy tester in optimization mode ran through 10 options for combinations of input parameters, and gave 10 results. When repeated runs over the same date range with the same set of parameters, the results are different, and repeated attempts also sometimes produce new results. By eye, 2-5 results are regularly repeated, the rest are most often new. If you do a run in the tester without optimization, the result is always the same. Moreover, optimization sometimes for this one set of parameters gives the same result as a single run. Question – why is this happening and how to solve it? All this for EURUSD for mid-2018. There was already a similar message for MQL4 but I have MQL5. There is a feeling that using the run OnTick() only on Open, High, Low, Close, and not every tick (one of the tester parameters)deviations more. History quality – 100%.
What I tried and did not help: disconnecting the terminal from the network, deleting and then automatically loading the history, starting the body in OnTick() only when a new bar appears
datetime LastCalculatedBarTime = 0;In the above post for 2007, it is mentioned that the swap even on bars deleted in the past is taken by the current one, is this true now for MQL5? But at the same time, single runs in my case give the same result (maybe just a few times in a row lucky).
if (LastCalculatedBarTime != mrate.time)
LastCalculatedBarTime = mrate.time;
Thank you already.