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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.