TroubleshootingUpdated 27 November 20267 min read

Why an Expert Advisor stops over a weekend, how to read the Journal, Experts log and Event Viewer to see what happened and when, and how to make it come back.

In short
  • An EA that works on ticks does nothing while the market is closed. Check that prices are moving before you look for a fault.
  • Over a weekend a working setup can be stopped by broker server maintenance, by a Windows restart (updates or a manual restart) or by a MetaTrader update that is applied when the terminal restarts.
  • The Journal, the Experts log and the Windows System log, read by time from Friday close to Monday, show which one it was.
  • A restart is only a problem if the terminal does not come back: automatic logon, a startup shortcut, a saved login and AutoTrading left on make it come back without you.

When an EA stops over the weekend, it is usually one of four things: it is not stopped at all and is waiting for the first tick after the market reopens; the broker did maintenance and the terminal did not log back in; Windows restarted and the terminal did not start again, or started without AutoTrading; or MetaTrader downloaded an update and installed it at a restart. The Journal, the Experts log and the Windows System log, read by time from Friday's close to now, tell you which one. Then you set the chain up so that the next weekend fixes itself.

Market closes, the weekend brings maintenance and updates, the setup comes back by itself, and on Monday the logs show what happened
What a weekend does to a trading setup, and where to look on Monday.

What a weekend does to a running EA

Weekend eventWhat it does to the EAWhat it leaves in the logs
Market closedNo new prices arrive, and the new-tick event is generated only when a new tick is received, so an EA that acts on each tick does nothing. One that runs on a timer keeps runningNothing unusual; the Experts log is quiet
Broker server maintenanceThe connection drops and the terminal tries to log in again. Many brokers do maintenance while the markets are closed over the weekendJournal: connection lost, login attempts, then a successful login or repeated failures
Windows restart (updates, you, or a restart from the provider's panel)Windows closes the running programs, MetaTrader included. The terminal returns only if the VPS signs in by itself and a startup shortcut launches itA gap in the Journal, then the lines of a fresh start; restart events in Event Viewer
MetaTrader updateThe terminal downloads a new build when it connects to the server and installs it when it restarts. MetaQuotes says the system cannot be deactivated in MT5 and cannot be disabled in MT4Update lines in the Journal (MT4 writes "LiveUpdate: finished"), then a terminal start
Account moved or login changed by the brokerThe terminal connects but the login is refusedRepeated failed logins; Invalid account in the status bar

First check: stopped, or waiting for the market

Before reading any log, open the terminal and look at four things:

  1. Prices. Are the quotes in Market Watch moving? If not, the market of that symbol may still be closed. Right-click the symbol in Market Watch and choose Specification: the lower part shows its quoting and trading sessions for every day of the week.
  2. Connection. The indicator in the bottom-right corner shows whether the terminal is logged in. No connection or Invalid account means the problem is the login, covered in MT4 invalid account or no connection.
  3. AutoTrading. The AutoTrading button (Algo Trading in MT5) must be on. If it is off, see MT5 algo trading disabled.
  4. The EA on the chart. The EA's name and status icon must be in the top-right corner of its chart.

If the terminal is not open at all, or opened only when you connected, Windows restarted and nothing brought it back: skip to the Event Viewer step below, then to the autostart section. If everything looks right but the EA still does not trade once prices move, the cause is inside the EA or its settings, not the weekend: see EA not trading on a VPS.

Read the logs from Friday close to now

Each tab only shows its latest entries. The full history is in daily files named by date (YYYYMMDD.log), so you can read Friday, Saturday and Sunday separately.

  1. Open the Journal files. In the Journal tab (Terminal window in MT4, Toolbox in MT5), right-click and choose Open. The folder with the log files opens and the current entries are saved to them (MT4 help, MT5 help).
  2. Open the Experts files. Do the same in the Experts tab. These files are in MQL4\Logs (MT4) or MQL5\Logs (MT5) and record what the EAs did and printed, including opened and closed positions.
  3. Narrow it down. Choose Viewer in the same menu: it filters by time range and shows Full or Errors only, and MT5 also has a No connection filter. Set the range from Friday afternoon to now.
  4. Find the last normal line and the first line after it. Write down both times.
  5. Check whether Windows restarted. Open Event Viewer (type eventvwr in the Start menu), go to Windows Logs, right-click System, choose Filter Current Log and enter 41, 1074, 6006, 6008. Microsoft gives the meaning: 1074 is a shutdown or restart started by an application or by a user, 6006 a clean shutdown, 41 and 6008 a shutdown that was not clean.

Event Viewer follows the VPS clock, and Microsoft notes that you should check the time zone of the server. Chart times are the broker's server time, which can differ from it, so do not match Event Viewer times against candles.

What you find tells you what happened:

In the logsWhat happenedWhat to do
Connection lost, login attempts, then a login that worksBroker maintenance, and the terminal came back by itselfNothing. If the EA still does nothing, look at the Experts log after the reconnection
Connection lost, then failed logins that never stopBroker maintenance ended with your login refused, or the server name changedCheck the account details the broker shows today; see MT4 keeps disconnecting on a VPS
A gap, an event 1074, then a terminal startA restart started by a program or a person, and autostart workedCheck AutoTrading and the EAs; plan the next update for a time you choose
A gap, an event 1074, no terminal start until you connectedA restart started by a program or a person, and autostart did not workFix automatic logon and the startup shortcut (next section)
A gap, an event 41 or 6008The VPS stopped without a clean shutdownIf nobody with access stopped it, send the times to your provider
Update lines, then a terminal startMetaTrader installed a new buildCheck that each EA loaded again without errors in the Experts log
Experts log shows the EA removed and not loaded againThe terminal reopened with a different profile, or the EA was taken off the chartLoad the saved profile or attach the EA again; check its inputs

Make the setup come back by itself

The weekend will bring maintenance and restarts again. A restart costs you nothing if the chain below works without you:

  1. Windows signs in by itself after a reboot (automatic logon). Without it the VPS waits at the sign-in screen and nothing starts.
  2. Each terminal has a shortcut where Windows starts it at sign-in.
  3. Each terminal saves its account login, so it reconnects without asking for a password.
  4. The EAs are on the charts the terminal opens with, and AutoTrading is on. Check it after a test restart: in the Expert Advisors options, MetaTrader 4 can disable AutoTrading when the account or the profile has been changed.
  5. You leave the VPS by closing the Remote Desktop window, not by signing out. Signing out closes MetaTrader; see keep MT4 running after closing Remote Desktop.

The full procedure, with a deliberate test restart, is in autostart MT4 and MT5 after a VPS reboot. The video below was recorded on a Dipgate Trading VPS (Windows).

How to Autostart MetaTrader 4 or 5 After a VPS Reboot (Autologon + Startup Folder)
Video: How to Autostart MetaTrader 4 or 5 After a VPS Reboot (Autologon + Startup Folder)

To keep Windows Update from choosing the moment, set when it installs and restarts: Windows updates on a trading VPS. Then ask the EA vendor one question: what the EA does with its own state (a grid level, a counter, a daily limit) after the terminal restarts. Open trades stay on the broker's server; the EA's memory of them depends on how it was written.

When the weekend is not the cause

  • The EA also stops in the middle of the week. Look for a frozen terminal or a VPS out of memory: VPS stuck or unresponsive and why a trading VPS gets slow.
  • The EA waits on purpose at Monday's open. Some EAs have a spread filter, a session filter or a news filter in their inputs. The Experts log shows the EA's own messages; the inputs and the manual show the rule.
  • Terminals of different brokers lost the connection at the same moments, with no restart. That points to the VPS or its network, not to one broker's maintenance.

How this works on Dipgate

  • Trading VPS (Windows): Dipgate sets up the autologin on the VPS. To have a platform start after a reboot, move its shortcut into the "My Platforms Autostart" folder. If you change the VPS password, run Autologon again with the new password, as the knowledge-base article explains.
  • Dipgate's resource-monitoring article suggests rebooting the VPS over the weekend to free up RAM. If you follow it, note the time, so the restart is not a mystery when you read Event Viewer later, and check on Monday that every terminal came back.
  • From the client area you can start and stop the Trading VPS, and the "VNC Console and Backups" panel is there too. If you stop or start the VPS from there, note the time as well.
  • Metatrader In Cloud: the automatic logon and startup steps above are for a Windows VPS. On Metatrader In Cloud, if the MetaTrader is not running, start or restart it from the service page in the client area (Services, My Services).
  • If the logs show restarts that nobody asked for, open a support ticket with the times from the Journal and Event Viewer.

FAQ

Do Expert Advisors run while the market is closed?

The terminal and the EA stay loaded, but the code an EA runs on each new tick does nothing until prices move again. Code that runs on a timer keeps running.

Can I stop MetaTrader from updating itself?

No. MetaQuotes says the automatic update system of MT4 and of MT5 cannot be disabled. The terminal checks for a new version when it connects to the trade server and installs it when it restarts.

Are my open trades safe if the VPS restarted over the weekend?

Open positions and pending orders are held on the broker's server, not in the terminal, so a restart does not close them. Whether the EA picks up its own internal state again after a restart depends on how it was written.

The EA is back on the chart but AutoTrading is off. Why?

Check the AutoTrading button first, then Tools, Options, Expert Advisors: MetaTrader 4 has options that disable AutoTrading when the account or the profile has been changed. Check both before Monday's open.

Is it a good idea to restart the VPS at the weekend?

It is the quietest moment for one, provided the terminals start again by themselves. Test that once with a deliberate restart, so a restart you did not plan cannot leave them closed.