MT5 Error 4756 + Retcode 10018: Market Closed Is Not a Platform Bug

MT5 Error 4756 + Retcode 10018: Market Closed Is Not a Platform Bug

If you see MT5 error 4756 together with retcode 10018, this is usually not a MetaTrader failure. In MQL5, code 10018 means TRADE_RETCODE_MARKET_CLOSED — the market is closed.

This often happens on weekends, during an inactive trading session for the instrument, or when trading for that symbol has not opened yet. In MQL5 discussions, this case appears regularly, for example when an EA tries to place an order at 00:00 but trading starts later.

That is why 4756 is only the outer error code. The real cause is in the retcode. In this case, the problem is not the terminal and not the strategy itself — the request was simply sent while the market for that symbol was closed. The MqlTradeResult structure is exactly what returns the retcode and comment needed to interpret the result of the trade request.

If the system shows only “error 4756,” the user is left guessing. If it shows a proper explanation of the rejection reason, everything becomes clear immediately.

For the full breakdown of MT5 error 4756 and its real causes, see the detailed guide on AlgoWay.

Best TradingView Connector | AlgoWay
Integrate TradingView alerts with top brokers using AlgoWay. Automate trading effortlessly.