How do i get coding to trade on specific time 08:00-20:00 on day of week - Tuesday to Thursday and from April to December on MQL5 - page 2
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
That only works when start < end. It doesn't work like 2100 to 1000. Because of the less than or equal. The code stops at 20:00:59.
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.
Find bar of the same time one day ago - MQL4 programming forum #1 & #6 (2017)
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)