When testing an EA in the strategy tester, code changes after the first test do not seem to be reflected correctly in subsequent tests.
Example scenario:
1. In the settings tab of the strategy tester, I select the ex5 file of my EA, symbol, period etc. In the input tab, I set the input values. Then, I run the test (no matter whether with or without optimization or with or without visual mode).
2. I change the source code of my EA, recompile and go back to the strategy tester. Now, I run the test again with exactly the same settings as in 1., but it seems that the strategy tester still uses the code from the first run. Code changes do not reflect in the test results.
3. I create a new EA with another name and another file with exactly the same source code as in 2. Then, I run the test with the same settings as in 1. and 2. Now, the changed code is reflected correctly. Test results are different from 2., although the code and settings are exactly the same as in 2.
Do I miss something?
In MT5, go to File==>Open Data Folder==>Tester==>cache, and delete the cache files that correspond to your previous backtests of the EA.
This issue has been discussed several times in this Forum.
When testing an EA in the strategy tester, code changes after the first test do not seem to be reflected correctly in subsequent tests.
Example scenario:
1. In the settings tab of the strategy tester, I select the ex5 file of my EA, symbol, period etc. In the input tab, I set the input values. Then, I run the test (no matter whether with or without optimization or with or without visual mode).
2. I change the source code of my EA, recompile and go back to the strategy tester. Now, I run the test again with exactly the same settings as in 1., but it seems that the strategy tester still uses the code from the first run. Code changes do not reflect in the test results.
3. I create a new EA with another name and another file with exactly the same source code as in 2. Then, I run the test with the same settings as in 1. and 2. Now, the changed code is reflected correctly. Test results are different from 2., although the code and settings are exactly the same as in 2.
Do I miss something?
Not reproducible.
1. I backtested the attached EA.
2026.02.20 09:28:47.360 Core 05 AnIntegerInput=10
2026.02.20 09:28:47.360 Core 05 ADoubleInput=20
2026.02.20 09:28:47.360 Core 05 2026.01.01 00:00:00 Backtest for 1.00, AnIntegerInput=10 ADoubleInput=20.0
2026.02.20 09:28:47.360 Core 05 final balance 10000.00 USD
2026.02.20 09:28:47.360 Core 05 OnTester result 65912.5
2. In the EA code I changed :
#define VERSION "1.00"
to
#define VERSION "2.00"
and I recompiled.
Then just click on the Tester "Start" button.
2026.02.20 09:29:08.672 Core 05 AnIntegerInput=10
2026.02.20 09:29:08.672 Core 05 ADoubleInput=20
2026.02.20 09:29:08.672 Core 05 2026.01.01 00:00:00 Backtest for 2.00, AnIntegerInput=10 ADoubleInput=20.0
2026.02.20 09:29:08.672 Core 05 final balance 10000.00 USD
2026.02.20 09:29:08.672 Core 05 OnTester result 32956.25
All is correct.
If you are still thinking there could be an MT5 issue, please provide all the information and data to reproduce the issue. At least the log files.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
When testing an EA in the strategy tester, code changes after the first test do not seem to be reflected correctly in subsequent tests.
Example scenario:
1. In the settings tab of the strategy tester, I select the ex5 file of my EA, symbol, period etc. In the input tab, I set the input values. Then, I run the test (no matter whether with or without optimization or with or without visual mode).
2. I change the source code of my EA, recompile and go back to the strategy tester. Now, I run the test again with exactly the same settings as in 1., but it seems that the strategy tester still uses the code from the first run. Code changes do not reflect in the test results.
3. I create a new EA with another name and another file with exactly the same source code as in 2. Then, I run the test with the same settings as in 1. and 2. Now, the changed code is reflected correctly. Test results are different from 2., although the code and settings are exactly the same as in 2.
Do I miss something?