It would be very helpful if we had these functions:
datetime MarketCloseTime(); // returns datetime when market closes THIS week
datetime MarketOpenTime(); // returns datetime when market opens NEXT week
Every broker can set the return to these on his server every week... Many EA's do something before market closes to protect from weekend gaps. This will be very useful for that.