How recognize if market is open or close or it's Saturday or Sunday? - page 2

 

You should use OnTimer, by creating a timer (let's say each 5 sec, to be on the safe side if the instrument is not very tradeable during trade hours), and in that function you test whether last broker time has changed or not.

Reason: