I have written this function to prevent the EA not to close trades on weekend....what about adapting that it can work in every timezone not only in the central european time zone?
Inserted Code
bool isMarketClosed() {
int dayOfWeek = TimeDayOfWeek(TimeLocal());
int hour = TimeHour(TimeLocal());
return
(dayOfWeek==5 && hour==23)|| // Friday closed 23:XX
dayOfWeek==6 || // Saturday closed
(dayOfWeek==0 && hour!=23) // Sonday closed except 23:XX
;
} Vucking good EA coder... https://t.ly/AZjRM