After reading this article you will know how to fix connection problems on your MetaTrader 4 platform or at least know the reason why it does not connect.
I won’t waste your time and go into details immediately.
Problem: You get to your computer or connect to your VPS server and find out that MT4 platform shows “No Connection” status message in the right-bottom corner, while it was working fine when you left.
Solution: Try to reconnect your MT4 to broker server and find out the reason for connection problems.
It is also convenient to learn how to read the connection status image.
Fully red means there is no connection with the selected server.
Green/red means the direct connection to the server.
Green/blue means that your platform is connected to a Data Center.
5 ways to make MT4 reconnect to broker server
Obviously, there might be several reasons to this, but before we make any assumptions and try to find out what’s the reason for MT4 losing connection to broker server, let’s look at 5 possible solutions to solve this problem.
What we are trying to do now is to re-establish a connection to the broker server.
I will assume that you were logged in and the connection was fine some time ago, but then you found it disconnected. Obviously, if you are not logged into your MT4 account you will also see this “No Connection” message, which means you simply need to connect to your account from the top menu by going to “File -> Login to Trade Account“.
1. Do “Rescan servers”.
The first thing you should try is to do “Rescan servers”. You can find this option by clicking the left-mouse button on the “No connection” label in the right-bottom corner of your MT4. Note that you need to click left mouse button. Once you run re-scan, MT4 look for the best server available and then try to connect. You can even try this several times every 30 seconds because it could be that first attempts to re-connect might be unsuccessful.
Let’s take a look how this looks like on HotForex MT4 platform.
You see there are lots of servers (MT4 Data Centers) available in different continents of the world. This means that MT4 automatically connects to the one that has fastest response rate. In this case, my MT4 is connected to server Europe2T1 (that’s because I am based in Europe) which response is 32 milliseconds. That’s very fast.
Most people have connection response rate of 400 ms or so, which is quite reasonable for simple trading. But if your trading strategy is vulnerable to Slippage, spreads and execution speed, then you need to connect to the fastest server possible. Usually, automated trading strategies that make a lot of trades are affected the most and speed of connection matter a lot here. We explain the impact of slippage, the speed of execution, spreads and similar things in Autotrading Academy.
You can look at this list of servers anytime you want, even when you are connected, and if there’s a need you can always choose to connect to any other server.
Also, I should mention, that your broker might not have that many servers to choose from.
In the picture above you see how this looks like on my MT4 trading platform. It shows only one server available named “main new”. The other server “main” is not available. But still, I can try “Rescan servers” option as this might help and make my MT4 to re-establish a connection.
MT4 usually connects to the “nearest” broker’s server available (i.e. one that has the least ping). However, it could be that if MT4 disconnects for any reason and then connects back again, it might select another server (if it’s the only server that’s working at that time), even if its ping (latency) is not good. The problem here is that MT4 might not switch back automatically to a better server once it gets back online. In that case “Rescan servers” should help as well.
2. A simple MT4 restart might solve the problem.
If you are able to restart your MT4 platform this might solve the connection problems. Chances are that on the next MT4 launch it will be able to connect to broker server successfully.
To restart MT4 you simply need to click the X at the top-right corner of MT4 window, or go to top menu “File->Exit“.
Once your MT4 is closed I recommend waiting at least 30 seconds before you open it again. This will give some time for MT4 to update all necessary files on exit. When you close MT4 it will always update log files with the most recent messages.
When you run MT4 again it might run an update and restart without any prompt, so don’t get surprised if this happens. It’s a good thing. MetaQuotes are constantly improving their software.
If for some reason you do not want to update your MT4 platform, I wrote an article on how to prevent MT4 from updating itself.
3. Try to Login to Trading Account again.
The third thing you can do is try to re-login to your trading account. Simply go to “File -> Login to Trade Account” in the top menu and then click OK when login window appears. Login, Password, and Server should already be filled in if you were logged in successfully last time. However, if any of the login information is missing you will have to fill it in. This short blog post on how to find your MT4 login and password might help you.
Even if you find login information already filled in for you, I recommend you to double check if it’s correct, especially if re-login does not help in first attempt.
Simply check if you have the right login number and server selected. As about the password, it is not visible, so I just recommend to copy/paste it again.
Here are a few tips when you copy/paste a password.
- When you copy password or any other information from some text file or email, always make sure there is no extra space or other characters at the beginning or end of the password. Because you do not actually see what you paste in the password field, because it is hidden, I recommend you to open Notepad (or some other text editor) and paste in the password just to check if it’s clean.
- Before you paste in a new password, I recommend you to clear the password input box. This helps you avoid confusion and actually know that you enter the newly copied password.
- Make sure the password is actually copied in memory. There were times when my computer did not copy anything new into memory. It just kept holding some older text I copied an hour ago. Not sure what was the reason, but keep in mind that if you copy something into memory, it might be that it was not copied. And then when you paste the text into hidden password field you won’t even notice that it’s not the password, but some old text from memory.
4. Try to login using another server.
Many brokers have more than one trading server to connect to and it could be that you’ve tried to connect to a wrong server. In that case, you might usually see “Invalid Account” message in the bottom-right corner, but still, even if you see “No Connection” message, it’s worth checking if you are connecting to the right server.
First, make sure you know exactly what server to connect to. This information is usually provided by your broker after you register an account with them.
When you open “File -> Login to Trading Account” window you will be able to choose broker server. Find the server you need to connect to and select it.
In the picture above we see login window of the OANDA MT4 platform. There are 5 servers to choose from and obviously, if I choose a wrong server I won’t be logged into my MT4 account.
If you do not remember which server to use exactly, you should look for an email from your broker with the login information. If this does not help you might try to look at the “Mailbox” tab at the bottom of your MT4 platform.
Specifically, you should be looking for a message with a headline like “Account Registration” of something similar, like in the image above.
Such message is not always available on MT4, but there were countless of times when this helped me to find my MT4 account login details fast.
Also, Mailbox on MT4 might have other important messages from you broker, like that message with a headline “Demo-Server new IP address”. This notified me that this particular Forex broker change their demo server IP address and I must re-login.
Checking messages daily will help you stay updated about things like that.
5. Disable your Anti-Virus, Firewall or Internet security software.
Maybe you’ve installed any new software on your computer or VPS server recently? Programs like Anti-Virus, Firewall and Internet security might be blocking your Internet connection (or just some of it).
I’ve seen this problem many times. People install some new firewall software to protect their computer from Internet attacks and in the result, they block any outgoing connections for anything else except their web-browser.
When you see web pages loading fine in your browser obviously you’ll assume that Internet connection is working fine, while applications like MetaTrader is actually blocked from the Internet and cannot connect to your broker server.
The same can happen with Anti-Virus software or any other software which is built to protect your computer from various Internet threats. Yes, I do agree that security comes first, but make sure you understand what you are doing and configure such software properly.
If you feel that Internet connection might be blocked, then try to disable your Anti-Virus or Firewall software (at least temporary). If this helps and you get your Internet connection back, then you should spend more time learning how to configure your security software properly.
Find the cause of the connectivity problem
If none of these solutions help try to figure out the cause of the connection problem. Here are the things you could do listed below.
A. Check if Internet Connection is working using web-browser.
The best option is to navigate to your MT4 broker’s website because chances are that it is located on the same server or network as their main MT4 server or MT4 Data Centers. If broker website is loaded, check “News” section if there are any notifications or messages about any ongoing server maintenance.
If you cannot load your broker’s website, try to load some other website just to see if your Internet connection is working.
B. Check MT4 Journal.
A lot of people never check MT4 Journal tab, which is located at the bottom of MT4. Make sure you check Journal tab for any error messages. A simple explanation might be printed here explaining why MT4 cannot connect.
Also, worth checking Mailbox tab for messages that might explain connection problems.
C. Find out if it’s just MT4 loses connection or your computer
You can run a test to find out if it’s just MetaTrader terminal loses connection with the broker server or the problem is the Internet connection in general.
Open two “cmd” windows and run “ping” command to check the connection to two different servers. The easiest way is to press CTRL+R, type cmd, and press ENTER/RETURN key.
Command 1: ping www.msn.com -t
Command 2: ping 22.214.171.124 -t
Tip: To stop these commands press CTRL+C.
The first command will show if there’s a connection to the www.msn.com server which is always online.
The second command will show if there’s a connection to one the FxOpen Data Center servers. The IP address I use in the example was provided by FxOpen after I have opened a live trading account with them.
Then, after you see MT4 got disconnected, check if ping is running or not.
If the first “ping” command shows “Request timeout” or some other error it means there’s no connection to the MSN server which is very rare to happen. This means there’s a problem with Internet connection on your computer. Check your connection or contact your Internet Service Provider.
If the second “ping” command shows “Request timeout” or some other error it means this particular broker server is not reachable for some reason. But if the first command is running okay it is most likely not your Internet connection problem.
Obviously, if broker server is not reachable MT4 might try to connect to another Data Center (if your broker has any). To speed up the process try the steps I have explained earlier or contact broker technical support.
If you see both “ping” commands giving an error then consider also checking if there’s nothing wrong with the computer or VPS installation. For example, it might be network card failure or some software like Anti-Virus or Firewall got broken or outdated.
D. Contact support.
If you are on VPS server then contact your VPS hosting provider’s support team and tell them you’ve tried all the things mentioned above in this blog post. You can simply give them the address to this blog post so they would know exactly what you did to solve the problem yourself.
If you do not use VPS and you’ve lost MT4 connection on your home/office computer, I would recommend you to contact your Internet Service Provider. Maybe there is something wrong on their end. However, if you can browse the websites on Internet, it is likely that there is something wrong with your broker’s server. In that case, you should contact your broker.
Contacting Forex broker support
The fastest way to contact your Forex broker support team is to use Live Chat if they offer this option. You can be speaking or chatting with one of their support members in minutes. Show them this blog post and let them know you’ve tried a number of things to solve this yourself with no luck.
Here’s “Contact” page on HotForex website.
On the right side, you can see there’s an option to choose “Live Chat”. I must say this is the fastest way to speak with someone from HotForex and possibly fix problems you have.
As you can see there are other ways to contact them as well.
Is there any why to force MT4 to reconnect using MQL4?
I don’t think there is a way to reconnect using MQL4. At least I have not seen any MQL4 function we could use in a script or EA. It might be available to tell the MT4 to reconnect using a custom coded DLL library, but because the research and testing would take a lot of time I haven’t tried that myself.
Monitoring connection with your broker MT4 server
If you want to detect even the smallest connectivity problems between your computer/VPS and your broker’s MT4 server, you should ping their IP address.
For this, you will need to get an IP address of your MT4 server. You can get this at your broker. For example, HotForex gives this information when you open an account.
If you do not know the IP address of the MT4 server, you might ask your broker or find it yourself on your computer. Here’s a great article on how to test your broker’s latency, which also explains how to find IP address of your MT4 server.
Next time you see the price is not moving and price charts are not updated on your MT4 platform, you will likely find “No Connection” message at the bottom right corner. In such case, use my 5 methods to re-connect and get your MT4 online again. Sometimes, a simple action can solve a big problem.