The code below would be suitable for MT5 (just decided to include this in my EA). Obviously comment out or delete from string msg through to MessageBox
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
The code below would be suitable for MT5 (just decided to include this in my EA). Obviously comment out or delete from string msg through to MessageBox
When dealing with time, a lot of people use strings; they can not be optimized. Using (int) seconds or (double) hours and fraction can be inputs.
See also Dealing with Time (Part 1): The Basics - MQL5 Articles (2021.10.01)
Dealing with Time (Part 2): The Functions - MQL5 Articles (2021.10.08)
MQL5 Programming Basics: Time - MQL5 Articles (2013.04.26)
Many thanks,
I normally use int,ulong double but hadn't realised the optimisation implication