Sat:
I am trying to get my head around the arithmatic involved with MQLDateTime Structs. If someone can point me to a sample code (function) where I can pass 2 TimeStructs and it returns the integer / long integer / double value of the number of seconds between the 2 timestamps.
Highly appreciated.
Regards
https://www.mql5.com/en/docs/basis/types/integer/datetime
Datetime Type
The datetime type is intended for storing the date and time as the number of seconds elapsed since January 01, 1970. This type occupies 8 bytes of memory.
Just use 2 datetime values (subtract one from the other).
You don't need MqlDateTime to calculate the difference in seconds between 2 timestamps.
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
I am trying to get my head around the arithmatic involved with MQLDateTime Structs. If someone can point me to a sample code (function) where I can pass 2 TimeStructs and it returns the integer / long integer / double value of the number of seconds between the 2 timestamps.
Highly appreciated.
Regards