When using a Virtual Private Server (VPS) it is important to configure any MetaTrader 4 (MT4) or MetaTrader 5 (MT5) instances to start when windows start. This is because sometimes Microsoft updates can restart your VPS unexpectedly. If your MT4 or MT5 instances aren’t running that means neither are your Expert Advisors! It is also important to make sure that your Windows user account is logged in for this to work.
Portable Script and Startup Script #
In the downloads section we share a simple script that can make MT4 run as portable via shortcuts and that can also make shortcuts to your startup folder.
To Run the script unzip it and place it in the folder which contains your MT4 portable installation (if you have multiple portable installs this would be on the folder that has the multiple installs there). Run the script and it will generate the shortcuts for you which you can copy or place at your convenience.
Alternatively follow the guide below or this one provided by Microsoft: https://support.microsoft.com/en-us/windows/add-an-app-to-run-automatically-at-startup-in-windows-10-150da165-dcd9-7230-517b-cf3c295d89dd
Create or copy a shortcut to your MetaTrader applications #
First, if the shortcuts do not exist, you will need to create some. You can easily create shortcuts to your desired MT4 or MT5 applications by copying and pasting an existing shortcut or by selecting “send to desktop” in the start menu for that application.
One way to find an existing shortcut is to find or search for your MetaTrader shortcut in your start menu, right-click and click “Open file location”.
In the Windows Explorer window that opens, right-click on the shortcut and click “Copy”.
Locate the Startup folder #
Open a second File Explorer window and navigate to ‘C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp‘. or C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Copy the shortcuts to the Startup folder #
In the Startup folder right click and click “Copy”. You may be required to approve administrator privileges for this task.
Once your shortcut is in the folder, MetaTrader should run every time the system starts and is logged in.
Test that everything is working correctly #
The easiest way to test if your MT4 or MT5 terminals run automatically is to simply restart your VPS! When you log in (if you haven’t configured your VPS to automatically login) you should see your MetaTrader terminals already running.