Features of the mql5 language, subtleties and tricks - page 279
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
Forum on trading, automated trading systems and testing trading strategies
Peculiarities of mql5 language, subtleties and techniques of work
Dominik Egert, 2024.11.28 23:12
Results from the attached file:
And now we add Fast-variant at the beginning.
And it became 30% slower.
In general, I do not understand how to interpret the test results.
And now we add Fast-variant at the beginning.
And it became 30% slower.
In general, I do not understand how to interpret the test results.
Maybe someone can replicate this rather curious behaviour?
This is a problem with the new compiler. Everything is fine in b4410.
This is a problem with the new compiler. Everything is fine in b4410.
This function indicates the presence/absence of a particular compiler optimisation, not the presence/absence of the compiler GUI flag of the same name.
Please with a link to this thread.
TimeUtils version 1.10 has been published on the codebase.
https://www.mql5.com/en/code/53970
Cosider this old-style code to lookup up a value into a static array:
Now static arrays are evaluated at runtime, so we can redefine the array as:
Forum on trading, automated trading systems and testing trading strategies
Peculiarities of mql5 language, subtleties and techniques of work
Dominik Egert, 2024.11.28 15:37
A little more optimised version:
It's likely to be faster that way.
And inverse ?
I mean that TimeToStruct is usually paired with the inverse StructToTime function.
to find "first Monday of the previous month" , "the beginning of the current quarter" etc.
And just to decompose the current date into day-month-year (to know) it may be necessary once a day and this moment is not critical. Nobody calls TimeToStruct on every tick :-)
And back?
Partially discussed.
Forum on trading, automated trading systems and testing trading strategies
Peculiarities of mql5 language, subtleties and techniques of work
amrali, 2024.12.03 20:05
TimeUtils version1.10 has beenpublished in the code base.
https://www.mql5.com/en/code/53970