MT5 “No connection”: what it means and how to fix it
That status in the corner of the terminal means MT5 has lost its trade server. Most of the time it is the weekend or broker maintenance; sometimes it is a firewall, a VPN or the wrong server picked by hand. Here is how to tell them apart fast, and what retcode 10031 means for automated trading.
Jump to: What “No connection” actually is · The 60-second diagnosis · The seven causes, ranked by how often they bite
What “No connection” actually is
The status refers to the control channel between your terminal and your broker's trade server: logins, quotes and order routing all live on it. While it is down, quotes stop updating and every order you send fails, because there is no route to the matching engine.
It is not the same as an internet outage. You can have a fast connection to the web and still see No connection in MT5, because the specific server and port the terminal uses is unreachable from your network.
The 60-second diagnosis
Open the Journal tab (Toolbox). Look for the last connection lines: “connect” followed by an IP and port means the terminal is trying; a loop of “failed” or “no connection” lines with the same server means the server side or the route is the problem.
Then rule out the two innocent causes: is the market open for your symbol? Crypto trades all weekend, but forex and indices do not. And does your broker's mobile app or web terminal connect with the same account? If it does, the credentials are fine and the problem is on this terminal or this network.
The seven causes, ranked by how often they bite
1. Market closed (weekend or daily rollover). The most common case and the most harmless: quotes resume when the market opens. 2. Broker maintenance or a crashed server: check the broker's status page, or try another of their servers from the login dialog.
3. Wrong server in the login. Typing the server name by hand or picking a demo/live server that does not host your account ends exactly like this. 4. Firewall, antivirus or VPN blocking the outbound port MT5 uses (443 on most brokers). 5. DNS or ISP routing: the terminal resolves the server name but the route dies.
6. Account disabled or a demo that expired: the server refuses the login and the terminal shows it as a connection problem. 7. A broken terminal install or a poisoned cache: last resort; a clean reinstall after the six causes above are ruled out.
What it means for automated trading
An Expert Advisor cannot route orders without this connection: OrderSend comes back with retcode 10031 (TRADE_RETCODE_CONNECTION, “no connection with the trade server”). Alerts that arrive while the terminal is offline cannot execute, no matter how the bridge delivers them.
When you automate with a bridge like SignalForge, delivery and execution are two different legs: your TradingView alert still reaches the backend and the EA reconnects on its own when the terminal is back, but the orders themselves need MT5 connected to the broker. If you see alerts marked as executed on one side and nothing in History on the other, check this status first.
The fix checklist, in order
Confirm the market is open for the symbol. Open the Journal and read the last connection lines. Try your broker's mobile app with the same account. Re-select the server from the list in the login dialog instead of typing it. Temporarily disable VPN, then check the firewall rule for terminal64.exe. If the demo expired or the account is disabled, that is your answer in the Journal. Only then reinstall.
Frequently asked questions
Why does MT5 say no connection every weekend?
Forex and index markets close from Friday evening to Sunday evening (server time). With no quotes, the terminal often shows No connection or frozen prices. It clears by itself at the Sunday open; crypto symbols are the exception and trade all weekend.
How do I know if my broker's server is down?
Log in to the same account from the broker's mobile app or web terminal. If those also fail, it is the server or the broker (check their status page or chat). If they connect, the problem is local: server name, firewall, VPN or the terminal itself.
Does No connection stop my EA from trading?
Yes. Without the server connection every order fails with retcode 10031. The EA keeps running and will act on signals again once the terminal reconnects, but nothing can execute during the outage.
I picked the server by hand and now it never connects. Why?
Account login and server have to match: a demo account on Server 2 will never authenticate against Server 1. Open the login dialog, let MT5 search the broker name and pick the exact server that hosts the account.
Stop guessing, start diagnosing
The History tab gives you the code, the Journal gives you the cause. When the terminal is healthy, the next thing worth automating is the boring part: turning TradingView alerts into MT5 orders without watching charts all day.
Reference: MQL5 runtime error codes; trade server return codes. 4756 and 10016 are different codes; 10016 identifies invalid stops.