MetaTrader does not come back after a Windows reboot because Windows starts up and then waits at the sign-in screen. Programs in a user's Startup folder only run once that user signs in, so until someone signs in, MetaTrader stays closed, and even then it opens only if a shortcut in the Startup folder tells Windows to start it. The fix has two parts, automatic logon and a startup shortcut for each terminal, plus a few MetaTrader settings so the Expert Advisors trade again once the terminal is back. Then you prove it works with a deliberate restart.
Why the terminals do not come back
Find your symptom, then go to the step that fixes it.
| What you see after a reboot | Cause | Fix |
|---|---|---|
| Nothing is running, terminals open only when you start them by hand | No automatic logon and no startup entry | Steps 1 and 2 |
| Terminals are open when you connect, but they were not running before you connected | Startup shortcut exists, but nobody was signed in until you connected | Step 1 |
| Terminal is open but shows no connection or asks for a password | Account login not saved | Step 3 |
| Terminal is connected, EAs are on the charts, but nothing trades | AutoTrading was off, or an option disabled it | Step 3 |
| Charts or EAs are missing | Last changes were not saved in the profile, or another profile opened | Step 3 |
| It worked, then stopped after you changed the VPS password | Automatic logon still holds the old password | Step 1 |
| Terminals close each time you leave the VPS | You sign out instead of disconnecting | Close the Remote Desktop window instead of signing out |
The last row is not a reboot problem, but it looks like one. Disconnecting (closing the Remote Desktop window) leaves your session and its programs running. Signing out ends the session and closes MetaTrader with it.

Step 1: sign in automatically after a reboot
On a Dipgate Trading VPS this step is already done: autologin is set up on the VPS. Come back to it only if you change the VPS password, because the autologin then has to be set again.
On any other Windows VPS or PC, Microsoft's free Autologon tool from Sysinternals sets up Windows' own automatic logon:
- Connect to the VPS with Remote Desktop as the user who will run MetaTrader (on most VPS this is
Administrator). - Download Autologon from the Microsoft page above, unzip it and run it.
- Check the Username and Domain fields: Username must be the user who runs MetaTrader. Autologon fills both in for the user you are signed in as; on a Dipgate Trading VPS, use the Domain value that Dipgate's knowledge-base article (linked below) gives.
- Type the password of that user, carefully. Autologon does not check it: a typo only shows up at the next boot, when the sign-in silently fails.
- Click Enable and confirm.
Three things to know about it, from Microsoft's page:
- The password is stored encrypted in the registry, but a user with administrator rights can retrieve it. So use a password you do not use anywhere else.
- Holding Shift while Windows boots skips the automatic logon once.
- Disable in the same tool turns it off. The command-line form is
autologon user domain password.
Step 2: put a shortcut where Windows starts it
On a Dipgate Trading VPS: move the platform shortcut into the My Platforms Autostart folder on the VPS. One shortcut per terminal.
On any Windows machine, the standard place is the Startup folder (Microsoft support):
- Right-click the Start button and choose Run (or press the Windows key and R).
- Type
shell:startupand press Enter. This opens the Startup folder of the user you are signed in as.shell:common startupopens the shared one, used for any user who signs in. - Copy the desktop shortcut of each terminal into that folder. Keep the renamed shortcuts, and keep
/portablein the target if you use portable mode. - Put each shortcut in one Startup folder only, not in both.
If you run several terminals, you can start them one after another instead of all at once, so they do not all load their history at the same moment. Save this as start-terminals.bat (paths are examples), and put a shortcut to it in the Startup folder in place of the single terminal shortcuts:
@echo off
start "" "C:\MT4\Broker-1234567\terminal.exe"
timeout /t 20 /nobreak
start "" "C:\MT4\Broker-1234568\terminal.exe"
timeout /t 20 /nobreak
start "" "C:\MT5\Broker-7654321\terminal64.exe" /portable
timeout /t 20 /nobreak waits 20 seconds before the next line (timeout reference). The 20 is an example: shorten or lengthen it to taste. Use either the batch file or the individual shortcuts, not both. To set up several terminals in the first place, see running multiple MT4 terminals with the same broker.
Step 3: make sure the EAs trade when the terminal comes back
A terminal that opens is not yet a terminal that trades. Check these in each copy, before the test restart:
| Check | Where | Why it matters |
|---|---|---|
| Account login saved | File, Login to Trade Account, with the option to save the account information ticked | Without it the terminal opens disconnected and waits for a password |
| AutoTrading on | AutoTrading button on the toolbar | The button normally keeps the state it had when the terminal closed; if it was off, the EAs stay idle |
| Automated trading allowed | Tools, Options, Expert Advisors | The global switch must be on. The same tab has options that disable automated trading when the account, the profile or a chart's symbol or period changes: if EAs keep coming back disabled, look here first |
| DLL imports, only if your EA needs them | Same tab | An EA that calls a DLL cannot work with this option off |
| EAs attached to the right charts | Each chart, top-right corner: the EA name and its status icon | The terminal reopens the charts of the current profile, with the EAs attached to them |
| Profile saved | File, Profiles, save the profile under a clear name | Chart changes are saved in the current profile automatically, but a named copy lets you reload the setup if something goes wrong |
After the setup, close each terminal once with File, Exit and start it again from its shortcut. You will see straight away whether the charts, the EAs and the AutoTrading state come back as you left them. A real crash or a forced restart does not give MetaTrader the chance to close cleanly, which is one more reason to have the profile saved beforehand.
One check sits outside MetaTrader: the EA's own memory. The open trades are on the broker's server and come back with the connection, and the EA's input settings are stored with the chart. What the EA does with its internal state after a restart (a grid level, a counter, a daily limit) depends on how it was written. Ask the vendor, or read its manual, before you rely on it through a reboot.
Step 4: test it with a deliberate restart
Pick a quiet moment, for example the weekend, when the market is closed or your EAs have no open trades.
- Write down what should be running: which terminals, which accounts, which EAs on which charts.
- Restart the VPS: Start menu, Power, Restart, or type
shutdown /r /t 0in a Command Prompt (shutdown reference). - Wait a few minutes before you reconnect. Your own Remote Desktop sign-in can also launch the Startup folder, so connecting too early can hide a missing automatic logon.
- Connect again. In each terminal open the Journal tab at the bottom: the first lines show when the terminal started. If that time is minutes before you connected, automatic logon works. If it matches the moment you connected, go back to Step 1.
- Check the rest against your list: connection indicator in the bottom-right corner active, AutoTrading on, each EA on its chart with its status icon, no errors in the Experts tab.
- Leave by closing the Remote Desktop window, not by signing out.
If you want to check the hard case too, shutdown /r /f /t 0 forces programs to close without waiting. Microsoft warns that forcing can lose unsaved data, so do it only after the profile is saved.
When this is not the right fix
- The terminal crashes while Windows keeps running. Startup entries only act at sign-in. A terminal that dies in the middle of the week stays closed until someone restarts it. Find the cause instead: see why a trading VPS gets slow and MT4 keeps disconnecting on a VPS.
- The VPS reboots often without you asking. Autostart makes each reboot cheaper, but frequent restarts have a cause to find. In Windows Event Viewer, the System log records them: event 1074 is written when an app (Windows Update, for example) or a user starts a restart, event 6008 when the previous shutdown was unexpected (Rackspace guide). On a Dipgate VPS, open a support ticket with those times. If the VPS freezes rather than restarts, Dipgate's article on resolving issues with a stuck VPS lists the usual causes: heavy load, full memory, CPU, RAM or disk overload.
- Platforms other than MetaTrader. The Startup folder works the same for NinjaTrader or TradeStation, but reconnecting and re-enabling strategies are settings of that platform. Check its own documentation.
- You do not want to manage Windows at all. For a single MetaTrader account, Metatrader In Cloud gives you one MetaTrader in the browser, with no operating system for you to set up (see below).
How this works on Dipgate
On a Trading VPS (Windows Server 2022, 2019 or 2016), autologin is set up on the VPS for you. To autostart a platform after a reboot, move its shortcut into the My Platforms Autostart folder. If you change the VPS password, redo the autologin with Autologon and the Startup folder, as Steps 1 and 2 describe. Dipgate's knowledge-base article How to Autostart Metatrader 4/5 after a VPS reboot and its video show the same procedure. Dipgate's resource-monitoring article also suggests a weekend reboot, which is a good moment for the test in Step 4.
On Metatrader In Cloud there is no operating system for you to configure, so the steps above do not apply. It is one MetaTrader 4 or 5, already running, opened in the browser, for one trading account with unlimited Expert Advisors. From the service page in the client area you can start, stop, restart or reinstall the MetaTrader; if it is not running, start it there. The MetaTrader settings of Step 3 (AutoTrading on, EAs attached to their charts) are still yours to check.
Metatrader VPS runs an Ubuntu desktop, not Windows, so the Windows steps on this page do not apply to it, and this page does not cover autostart on Ubuntu.
