Introduction #
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 #
Here we share a simple script that can make MT4 run as portable via shortcuts and that can also make shortcuts to your startup folder.
Download Script: CreateShortcutsHere.zip
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 one of the following ones with alternative methods:
https://www.howtogeek.com/228467/how-to-make-a-program-run-at-startup-on-any-computer/
https://www.howtogeek.com/138159/how-to-enable-programs-and-custom-scripts-to-run-at-boot/
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
On Windows 8,10 and 11 you will need to press Windows Key + R, type “shell:startup” into the Run dialog, and press Enter to access the folder.
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.
No Comment