Strategy Tester agent: meaning of ‘bytes loaded’ and access to the EX5 fingerprint

Hello MetaQuotes team,

I am trying to establish the provenance of an EX5 file loaded by a local MetaTrader 5 Strategy Tester agent. In one run, the agent journal reported “expert file added ... 239101 bytes loaded,” while the frozen local EX5 file measured 239012 bytes. I do not know whether these figures refer to the same representation.

Could you please clarify:

1. In the Strategy Tester documentation, what data does the MD5 digital fingerprint cover: the raw EX5 bytes, a serialized task or parameter block containing the EX5, or something else?
2. Can a user retrieve that fingerprint through a supported terminal or agent log, API, report, or tool?
3. What exactly does “bytes loaded” measure in the agent journal? Can it differ from the local EX5 file size because of packaging or another transformation?
4. Is there a supported way to identify or hash the exact EX5 bytes received by a local agent after a run, without rerunning the test?

Please point me to any authoritative documentation and indicate which platform builds it applies to.

Thank you.
223151:
Hello MetaQuotes team,

I am trying to establish the provenance of an EX5 file loaded by a local MetaTrader 5 Strategy Tester agent. In one run, the agent journal reported “expert file added ... 239101 bytes loaded,” while the frozen local EX5 file measured 239012 bytes. I do not know whether these figures refer to the same representation.

Could you please clarify:

1. In the Strategy Tester documentation, what data does the MD5 digital fingerprint cover: the raw EX5 bytes, a serialized task or parameter block containing the EX5, or something else?
2. Can a user retrieve that fingerprint through a supported terminal or agent log, API, report, or tool?
3. What exactly does “bytes loaded” measure in the agent journal? Can it differ from the local EX5 file size because of packaging or another transformation?
4. Is there a supported way to identify or hash the exact EX5 bytes received by a local agent after a run, without rerunning the test?

Please point me to any authoritative documentation and indicate which platform builds it applies to.

Thank you.

This information is not publicly documented. Please refer to the official documentation and publicly available information.

NOTE: This forum is intended for user discussions, troubleshooting and knowledge sharing, rather than as a direct communication channel to MQ.

Thank you for the clarification. I checked the official documentation but could not find details for these points. Is there a designated official channel for technical questions about undocumented Strategy Tester behavior, or should we treat these details as unavailable to users? I am asking only about the general behavior of local Strategy Tester agents; no account details or files are involved. Thank you.
223151 #:
[S]hould we treat these details as unavailable to users? I am asking only about the general behavior of local Strategy Tester agents...

We can reasonably infer that Metaquotes won't be documenting MT5's traffic between the terminal and the agent:

All traffic between the terminal and the agent is encrypted.

Documentation on MQL5: Testing Trading Strategies / MQL5 programs
Documentation on MQL5: Testing Trading Strategies / MQL5 programs
  • www.mql5.com
The idea of automated trading is appealing by the fact that the trading robot can work non-stop for 24 hours a day, seven days a week. The robot...
223151:

2. Can a user retrieve that fingerprint through a supported terminal or agent log, API, report, or tool?

I'm not sure this is the same fingerprint that you're talking about, but you can look here - the file SingleTestCacheHeader.mqh contains the field hash_ex5[16].
SingleTesterCache
SingleTesterCache
  • 2025.04.03
  • www.mql5.com
Tester's single pass data.
Stanislav Korotky #:
I'm not sure this is the same fingerprint that you're talking about, but you can look here - the file SingleTestCacheHeader.mqh contains the field hash_ex5[16].

Oh wow. To the extent that my reasonable inference was wrong, I apologize.

That CodeBase post states:

Acknowledgements.

Thanks to the developers for creating the Tester caches and helping me to unpack its formats.

Thank you, Stanislav, for pointing me to SingleTesterCache and the hash_ex5[16] field, and thank you, Ryan, for the follow-up.

If you happen to know: does hash_ex5[16] represent a digest of the raw EX5 file contents, or is it another value stored in the tester cache? I understand this is user-contributed code and may not be an officially supported interface.
223151 #:
Thank you, Stanislav, for pointing me to SingleTesterCache and the hash_ex5[16] field, and thank you, Ryan, for the follow-up.

If you happen to know: does hash_ex5[16] represent a digest of the raw EX5 file contents, or is it another value stored in the tester cache? I understand this is user-contributed code and may not be an officially supported interface.

More documentation:

For each block of parameters, a digital fingerprint in the form of MD5-hash is created, which is sent to the agent. MD5-hash is unique for each set, its volume is many more times smaller than the amount of information on which it is calculated.

The agent receives a hash of blocks and compares them with those that it already has. If the fingerprint of the given parameter block is not present in the agent, or the received hash is different from the existing one, the agent requests this block of parameters. This reduces the traffic between the terminal and the agent.

After the testing, the agent returns to the terminal all of the results of the run, which are shown in the tabs "Test Results" and "Optimization Results": the received profit, the number of deals, the Sharpe coefficient, the result of the OnTester() function, etc.

During optimizing, the terminal hands out testing tasks to the agents in small packages, each package contains several tasks (each task means single testing with a set of input parameters). This reduces the exchange time between the terminal and the agent.

The agents never record to the hard disk the EX5-files, obtained from the terminal (EA, indicators, libraries, etc.) for security reasons, so that a computer with a running agent could not use the sent data. All other files, including DLL, are recorded in the sandbox. In remote agents you can not test EAs using DLL.

The testing results are added up by the terminal into a special cache of results (the result cache), for a quick access to them when they are needed. For each set of parameters, the terminal searches the result cache for already available results from the previous runs, in order to avoid re-runs. If the result with such a set of parameters is not found, the agent is given the task to conduct the testing.

All traffic between the terminal and the agent is encrypted.

Documentation on MQL5: Testing Trading Strategies / MQL5 programs
Documentation on MQL5: Testing Trading Strategies / MQL5 programs
  • www.mql5.com
The idea of automated trading is appealing by the fact that the trading robot can work non-stop for 24 hours a day, seven days a week. The robot...
Thank you, Ryan. The excerpt says that an MD5 fingerprint is created for each parameter block and sent to the agent. Do you know whether that documented fingerprint is the same value as `hash_ex5[16]` in the SingleTesterCache header, or is the relationship between them unknown? I understand the CodeBase item is user-contributed; I’m asking only about the relationship between that field and the fingerprint described in the excerpt.
223151 #:
Thank you, Ryan. The excerpt says that an MD5 fingerprint is created for each parameter block and sent to the agent. Do you know whether that documented fingerprint is the same value as `hash_ex5[16]` in the SingleTesterCache header, or is the relationship between them unknown? I understand the CodeBase item is user-contributed; I’m asking only about the relationship between that field and the fingerprint described in the excerpt.

You're welcome.

At my own risk of splitting hairs, the excerpt says that "a digital fingerprint in the form of MD5-hash is created..."

I have found no direct evidence of the relationship. Based on the info in Post #5, fxsaber collaborated with Metaquotes Developers on that CodeBase project.

fxsaber is more or less a living legend around here. Maybe he could tell you.

(For the record, so is Stanislav Korotky).
Ryan suggested that fxsaber might know more about the SingleTesterCache project. Could you clarify what `hash_ex5[16]` in CodeBase 27611 represents, including its input and algorithm? Also, is there a documented layout/alignment rule in the preserved CodeBase 27611 files that lets a reader derive the field offset without trial offsets or searching for an expected value? If so, could you point to the relevant part of those files? I understand this is community-contributed code; I am asking only about this library version, not for an official MetaQuotes statement.