You won't want to compare string versions of times.
Convert the times into components using StringToTime, then compare days to days, hours to hours, minutes to minutes, etc.
https://www.mql5.com/en/docs/convert/stringtotime
https://www.mql5.com/en/docs/constants/structures/mqldatetime
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
Hello all,
I have been working on programming my trading strategy and need a little help on the last part.
I want to constrain my EA to operate between Sunday and Thursday and only trade from 23:00CST to 12:00CST.
this is what I have tried thus far and cannot seem to get it to work on back testing...
Please help!