Skip to content
RealTradeMaster

MetaTrader 5 troubleshooting

How do you fix MT5 error 10018?

MT5 trade server code 10018 means the server reported the market closed for the requested operation. Start by comparing the time of the request with the trading session for the exact symbol on that broker's server. A weekday can still have a session break, and some symbols can show quotes when order entry is closed. MetaQuotes trade server codes · MetaTrader 5 Market Watch and Specification

1. Look up the symbol's trading session

Open Market Watch, right-click the exact symbol your order or EA used, then select Specification. Scroll to Sessions and read the Trade schedule for the relevant day. Check each session on that day, because a symbol can have more than one. If the broker lists separate quote and trade sessions, use the trade session to check order eligibility. MetaTrader 5 Market Watch and Specification

2. Compare times on the same clock

Use broker server time when comparing the request with the session schedule. Market Watch can show the last quote's timestamp in the trade server's time zone. For an EA, record the exact symbol, the timestamp with its time basis, and whether the symbol's last quote was fresh. MQL5's TimeCurrent() can report the time of the last received quote and may be stale outside active sessions. A local clock, VPS clock or quote from a different symbol can lead to the wrong conclusion. MetaQuotes on TimeCurrent

Worked example. Suppose a broker lists two illustrative Wednesday trade windows, 01:00–12:00 and 13:00–23:00 server time. A request at 12:30 server time is between the sessions even if the chart still displays a quote. The scheduled reopening in this example is 13:00. Confirm any holiday or maintenance exception against the broker's current notice before treating the schedule as active.

3. Handle the closure without repeated submissions

An EA can use SymbolInfoSessionTrade() to read the weekly session schedule. Iterate the session indices for the day, handle windows that cross midnight, and record which window was checked. Use the published broker notice for date-specific overrides. If the server returns 10018, log the result and suppress immediate retries. When the session resumes, recheck quote freshness and whether the original setup is still eligible before considering a new request. MetaQuotes on SymbolInfoSessionTrade

Frequently asked questions

Can XAUUSD return 10018 while another forex symbol trades?

Yes. The trading schedule belongs to the exact broker symbol. Compare the two specifications separately, including any symbol suffix.

What if the symbol's published hours show that it should be open?

Check for the exact symbol and server clock again, then look for a broker holiday or maintenance notice. If the server still returns 10018 during the stated session, ask broker support to confirm the session for that account and symbol, including the rejected timestamp.

Get help with the rejection

Bring the symbol, server-time timestamp and sanitized rejection line to TradeMaster Discord if you'd like help reading the session schedule.

MetaQuotes references