MT4 error 132: Market is closed (ERR_MARKET_CLOSED)

The symbol isn't trading right now: a weekend, a holiday or a daily break. Nothing was executed; wait for the session.

132ERR_MARKET_CLOSED
Yes, after a waitSafe to retry?
NoCould it have executed?

What it means

You see this code in GetLastError() in MQL4, after a trade function fails on the server side.

The broker isn't accepting trades on this symbol at this time. Sessions are set in the broker's server time.

A price may still show on the chart even while trading is shut.

Common causes

  • Weekends and holidays.
  • A daily break, common on indices, metals and stock CFDs.
  • A schedule written in your own time zone instead of server time.

How to fix it

  • Check MarketInfo(sym, MODE_TRADEALLOWED) before sending.
  • Plan sessions in server time, which you can read with TimeCurrent().
  • Queue the order for the next session rather than looping.

Example in MQL4:

if(MarketInfo(Symbol(), MODE_TRADEALLOWED) == 0)
   Print(Symbol(), " is not trading now, server time ", TimeToString(TimeCurrent()));

Is it safe to retry?

Yes, once the market opens.

Could the order have executed?

No. Nothing is filled while the market is closed.

How Tickwire handles it

Tickwire treats it like MT5 10018, and the MT4 code stays in the message.

Broker server time is measured per server, never assumed to be UTC. See time zones.

All MetaTrader error codes

One API for MT4 and MT5

Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.