Features of the mql5 language, subtleties and tricks - page 285

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
What's your favourite activity?
For obvious reasons, he won't answer.
As I understood, most of portal's participants are not certified programmers but have learnt the language out of necessity.
But maybe a person has a completely different interest not related to the market, and for him the market is a tool....
If the Expert Advisor uses data from a file, there are several ways to pass it to the Agents.
Each has its pros and cons, so let's also measure the efficiency in case of optimisations.
For this purpose, I enabled seven local Agents on the mat. mode, sandboxes of which are located on RAMDrive.
Cloud - tester_file.
.
Efficiency.
Local Agents - COMMON-file.
.
Efficiency.
Local Agents - #resource.
.
Efficiency.
Bottom line.
Efficiency.
0 seconds
If you need it fast and without Cloud - #resource is the most efficient way to transfer data to Agents.
Other options are terribly slow even on RAMDrive, because allocating memory for a dynamic data array on each pass is very expensive.
If you need a lot of data, it is quite ambiguous that it makes sense to mess with the Cloud.
OnTester results on all variants coincided - 1368151. Just in case the cache was manually deleted before launching.
Need fast and no Cloud - #resource is the most efficient way to transfer data to Agents.
Unfortunately, in addition to the size limit (sizeof(#resource) < 128Mb) recompilation is required with new data as it is stitched into EX5.
If you need a lot of data, it is quite ambiguous that it makes sense to mess with the Cloud.
Forum on trading, automated trading systems and testing trading strategies
Peculiarities of mql5 language, subtleties and techniques of work
fxsaber, 2025.01.22 11:09 AM
Cloud - tester_file.
Efficiency.
Why the hell the following change speeds up optimisation almost three times!
Why does FileLoad to a dynamic array run slower than to a static array?
Why the hell does the next change speed up optimisation by almost three times!
Why is FileLoad to a dynamic array slower than to a static array?
I'll assume that the global array is allocated once, since the Expert Advisor is loaded once (unless the ExpertRemove function was called).
The dynamic array will be allocated on each pass.
I assume that the global array is allocated once, because the Expert Advisor is loaded once (unless the ExpertRemove function was called).
The dynamic array will be allocated on each pass.
It's a pity that working with data in mat mode is more theory than practice.
Why is FileLoad to a dynamic array slower than to a static array?
I think, just not optimal reserve in ArrayResize is used inside FileLoad.