why is Strategy Tester with "All marked watch Symbols" that SLOW ???

 

Hi together,

I will give you short example of a massiv performance issue in MT5 while backtesting -  that's really, crazy!!


Testcase:

three symbols: EURUSD, GBPUSD and USDCAD

Testperiod: 2025.09.15 - 2025.09.20 (one week) , Timeframe M5


Testresult's with single Tests:

EURUSD needs 8 seconds

GBPUSD need 10 seconds 

USDCAD needs 6 seconds

so overall 24 seconds for all symbols together!


but.... if I do the same test with all symbols together (select: All Market Watch symbols) it takes  6 Minutes an 36 seconds!!! - that's unbelievable to me!!!

the settings are the same!, just instead a single symbol I select "All Market Watch symbols"

MarketWatch

Agents

over-all-result


For more details from see screenshot's below.

single tests:

EURUSD GBPUSD USDCAD


I have no idea for that! - is there a solution for that? - please help.

 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
4infoI have no idea for that! - is there a solution for that? - please help.

Not enough information was provided to offer an explanation:

  1. What build of MT5 are you using? The current official build is 5260. Any other above that is a "beta" build which could have bugs.
  2. You did not mention nor provide the log files. There are multiple logs to consider—the main tester's log, and each of the individual agents' logs. So we have no idea if any issues were reported.
  3. We also have no idea if the EA code itself my be causing the issue.
 
Fernando Carreiro #:

Not enough information was provided to offer an explanation:

  1. What build of MT5 are you using? The current official build is 5260. Any other above that is a "beta" build which could have bugs.
  2. You did not mention nor provide the log files. There are multiple logs to consider—the main tester's log, and each of the individual agents' logs. So we have no idea if any issues were reported.
  3. We also have no idea if the EA code itself my be causing the issue.

Information-update

1) it's the current build 5260

2) Logfiles (see attachments)

3) in single mode there is no problem!, just "All market watch symbols" use huge of time....

 
4info #:

3) in single mode there is no problem!, just "All market watch symbols" use huge of time....

I suspect the problem is lack of memory.

You can try leaving only one Agent working, and then run optimization for all symbols.

Работа MT5-тестера с RAM/Disk.
Работа MT5-тестера с RAM/Disk.
  • 2025.09.01
  • www.mql5.com
Многоядерный MT5-тестер имеет свои особенности работы с памятью и диском, знание которых дает понимание его ограничений на запускаемых конфигурациях и объясняет некоторые возникающие ошибки во время
 
4info #:

Information-update

1) it's the current build 5260

2) Logfiles (see attachments)

3) in single mode there is no problem!, just "All market watch symbols" use huge of time....

The file "agent3000.txt" is a copy of the file "all-market-symbols.txt", so information is missing about the first core/thread used.

However, from the available files, the tasks did not start in parallel. Instead they were delayed and started almost sequentially instead of in parallel, and each one took very long for some unknown reason.

In post #4fxsaber suggests that it might be a lack of memory issue. This may be the case (you will have to test it), but I am inclined to think that maybe something else is the issue, because the logs show that each thread only used 2GB out of 7GB.

Maybe some other processes are interfering. They may be consuming too many resources (RAM or CPU) and impacting MetaTrader. This is speculation.

Monitor the Windows Task Manager when running the test and watch how the CPU and Memory consumption reacts, and what other processes may be impacting the situation.

 
Fernando Carreiro #:

The file "agent3000.txt" is a copy of the file "all-market-symbols.txt", so information is missing about the first core/thread used.

However, from the available files, the tasks did not start in parallel. Instead they were delayed and started almost sequentially instead of in parallel, and each one took very long for some unknown reason.

In post #4fxsaber suggests that it might be a lack of memory issue. This may be the case (you will have to test it), but I am inclined to think that maybe something else is the issue, because the logs show that each thread only used 2GB out of 7GB.

Maybe some other processes are interfering. They may be consuming too many resources (RAM or CPU) and impacting MetaTrader. This is speculation.

Monitor the Windows Task Manager when running the test and watch how the CPU and Memory consumption reacts, and what other processes may be impacting the situation.

if he has 7gb of memory then its probably a RAM issue because windows overhead is like at least 6gb
 
@Casey Courtney #if he has 7gb of memory then its probably a RAM issue because windows overhead is like at least 6gb

You may have a point! On my computer, Windows 10 Pro is using 4.0GB with nothing else running (except OneDrive in background).

When I open MetaTrader, with two charts open, with one having a custom indicator running that consumes tick data for calculations, it goes up to 4.4GB.

 
fxsaber #:

I suspect the problem is lack of memory.

You can try leaving only one Agent working, and then run optimization for all symbols.

that's sounds good - give them a try...

->I disable agents 2,3,4

agents

-> running test-case...

get also bad performance results!. 5 minutes and 39 seconds - on the other side symbol per each runs within seconds!

additionally my system cpu log shows a very low cpu-usage during the test-case - it seems cpu consumption was strongly limited by tester ?!

- during the test with "All Market Symbols" cpu usage per core never get more then 50%

- during single symbol test, cpu use between 80-99% and deliver within seconds.

Files:
 
Run optimization of such an EA.
void OnInit() {}
 
fxsaber #:
Run optimization of such an EA.

that make no sense to me!.

in single mode everything works like charm!. so it was impossible for me to find a resolution in debugger or optimization.

the problem is the test engine itself.