MT4: Check if current market is open

 

Hi,

Is there a function available for checking if the market for the current symbol is open?

In detail, I am running a timer in my expert advisor. And if the market is closed I want to do certain actions:


void OnTimer()
{
        if (!IsMarketOpen(Symbol())
        {
                // do something
        }
}

Regards,

Reason: