i want to place order in 10:00:15
i tried coding for given minutes, but how to make order in exact seconds too?
int datetime = TimeCurrent();
int hour = TimeHour(datetime);
int minute = TimeMinute(datetime);
if (DayOfWeek() != Today && hour == 10 && minute == 0)
Today = DayOfWeek();
You'd need to set up a timer ( OnTimer() ), so that it 'ticks' every second.
Therein you'd use i.e TimeLocal() with MqlDateTime type parameter. The MqlDateTime structure is then filled accordingly and you can read out day, minute, second etc.
To add comments, please log in or register