Open hours for server

 

In order to not mess up placing market order and corresponding pending SL and TP i stop placing orders on Friday in good time. That works OK. but it could be other days when trading closes.

Is there a way to query the trade server about closing time on "this" day?

There is something, "SymbolInfoSessionTrade" but it requires "ordinal number of session"  whatever that is.

The "crude" way could be to avoid placing trades 5 minutes before midnight and wait until 5 minutes after midninght  on every day.

Reason: