lippmaje: This will work for the current day. If the EA runs
overnight however you need to recompute g_StartTime as it contains the current date.
So if i run this on the strategy tester will i need to somehow compute g_StartTime for each run of the code or will the Strategy Tester in effect
deal with that?
The strategy tester will call your OnInit once upon start of the test and then OnTick only, for as long as the test period goes on. You need to
recompute g_StartTime on every new day. You could just move the code of OnInit into OnTick of course, at the cost of some performance.
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.
This will work for the current day. If the EA runs overnight however you need to recompute g_StartTime as it contains the current date.
So if i run this on the strategy tester will i need to somehow compute g_StartTime for each run of the code or will the Strategy Tester in effect deal with that?
Thanks
Paxman