Optimize problem.

 

I 've found problem while optimizing.

MetaTrader5. 

I optimized my EA and select some result for back test.

But back test result is different.

What is the problem?

I 'm using custom indicator.


I uploaded cases.

I changed code simply.

Files:
 

It was discussed on the Russian forum some time ago with MetaQuotes admins, and it was the following comclusion: it is the bug in the EA.

----------------

Similar issue was discussed on this thread https://www.mql5.com/en/forum/338047 and in this Russian thread: https://www.mql5.com/ru/forum/340078
and the errors in the EAs were the reasons the different results of backtesting.