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

 
fxsaber #:

Brilliant work! Perhaps MQ should consider this solution as a replacement for its standard functions.

The performance boost here is of great practical significance – Tester.

I added these functions into TimeUtils libray (here https://www.mql5.com/en/code/53970).

Any suggestions would be great. Thank you.

High-Performance Time Functions (TimeUtils)
High-Performance Time Functions (TimeUtils)
  • 2024.12.03
  • www.mql5.com
High-performmance functions for dealing with time.
 
fxsaber #:
Based on this discussion, I did a quick calculation (performance is needed, as it is used in this project) of the position duration.

You can get all public holidays in a specific country for year.

https://date.nager.at/scalar/#api-version-4/tag/holidays/GET/api/v4/Holidays/{countryCode}/{year}

Send a GET request via WebRequest() function, then parse its response.

A cache of results could be built/saved.