Skip to content

Product docsForex VPS

MetaTrader on a VPS: troubleshooting connections and Expert Advisors

Fix MetaTrader problems on a Forex VPS: no connection, invalid account, Expert Advisors that do not trade, terminals that close, high ping and memory use.

  • Beginner
  • 15 min read
  • Updated
On this page
  1. Before you start
  2. "No connection" or the indicator stays red
  3. "Invalid account"
  4. The Expert Advisor does not trade
  5. The terminal is closed after a while
  6. The terminal will not start a second time
  7. High ping
  8. High CPU or memory use
  9. Next steps

Most MetaTrader problems on a VPS fall into four groups: the connection to the trade server, the automated-trading settings, a terminal that is no longer running, and resources. The terminal's own logs usually point to the right group.

Before you start

  • Connect to the VPS with Remote Desktop; see Remote Desktop connection problems if that fails.
  • Open the Toolbox in the terminal (Ctrl + T) and look at the Journal and Experts tabs. Copy the exact message.

"No connection" or the indicator stays red

  • Check that you entered the right Server name in File › Login to Trade Account; brokers often have several servers for demo and live accounts.
  • Your broker's server may be down or in maintenance; check with the broker.
  • Test general internet access on the VPS, for example by opening a website.
  • After a password change at the broker, log in again with the new password.

"Invalid account"

The login number, password or server is wrong. Log in again with the details from your broker. An investor (read-only) password lets you watch the account but not trade.

The Expert Advisor does not trade

Work through the switches:

  1. The Algo Trading button in the toolbar (AutoTrading in older versions) is on and green.
  2. Tools › Options › Expert Advisors allows automated trading. If the option to disable automated trading when switching accounts is on, switching accounts turned it off: turn it on again.
  3. The Expert Advisor's own settings allow trading, and its name shows in the top-right corner of the chart.
  4. The Experts and Journal tabs show no errors, such as a market that is closed or a lot size the broker does not accept.
  5. If the Expert Advisor needs DLL calls, Allow DLL imports must be on for it; enable it only for programs you trust.

The terminal is closed after a while

The terminal will not start a second time

Two copies cannot run from the same folder. Install the second terminal into its own folder (installer Settings), as in the setup guide.

High ping

The ping shown in the status bar is the time to your broker's trade server. If it is high, your VPS location is far from that server. Ask your broker where its servers are; you can move to a closer location with a new VPS in that location.

High CPU or memory use

  • Close charts you do not need and lower Tools › Options › Charts › Max. bars in chart, then restart the terminal.
  • Run backtests and optimisations outside trading hours; MetaTrader 5's tester uses every core.
  • Check Task Manager for other programs that use resources; see high CPU or memory usage.

Next steps

Frequently asked questions

Where does MetaTrader log errors?

In the Toolbox: the Journal tab shows the terminal's own messages, the Experts tab shows messages from Expert Advisors. File › Open Data Folder opens the folder with the log files.

Why did my terminal close during the night?

Usually a Windows update restarted the server, or the session was signed out instead of disconnected. Plan updates and start the terminals automatically after a restart.

Can a smaller ping make my trades better?

A server close to your broker's trade server shortens the time an order travels. It does not change how your strategy performs; we do not give trading advice.

Is the VPS itself slow?

Check Task Manager first. Many terminals, charts with many bars and backtests can fill the CPU or memory; see the memory section in our setup guide.

Generate Password

Please confirm