MetaTrader 4 Automatic Startup Guide

person
FXVPS
Share
MetaTrader 4 Automatic Startup Guide

If your VPS restarts — whether from a Windows Update, a power event, or scheduled maintenance — your MetaTrader terminals will not come back on their own unless you configure automatic startup. Without it, your EAs sit idle, your open positions go unmanaged, and you might not even notice until hours later. This guide walks you through setting up fully automatic startup so your MT4 terminals launch, log in, and resume trading every time your VPS boots, with zero manual intervention.

Why Automatic Startup Matters

A trading VPS is designed to run 24/7, but restarts are unavoidable. Common reasons your VPS might reboot:

  • Windows Updates — Even with careful update scheduling, some updates require a restart.
  • VPS provider maintenance — Hosting infrastructure occasionally needs patching.
  • Power or hardware events — Rare, but they happen.
  • Intentional restarts — You might restart your VPS to clear memory or resolve a performance issue.

In every case, you need three things to happen automatically after the reboot:

  1. Windows logs in to your user account (auto-login).
  2. MetaTrader terminals launch with the correct profiles loaded.
  3. Expert Advisors resume trading with AutoTrading enabled.

Let us set up each piece.

Part 1: Configure Auto-Login

By default, Windows requires you to enter a password at the login screen. If nobody types the password, the desktop never loads and your startup programs never run. Auto-login bypasses this so Windows goes straight to the desktop.

FXVPS servers come with Microsoft’s AutoLogon utility pre-installed on the C: drive. Here is how to use it:

  1. Connect to your VPS via RDP.
  2. Navigate to the C: drive in File Explorer.
  3. Right-click AutoLogon.exe and select Run as administrator.
  4. Enter your Windows username and password in the fields provided.
  5. Click Enable to activate auto-login.

From now on, when your VPS restarts, Windows will automatically log in to your account without waiting at the login screen.

⚠️ Warning: Your auto-login password must match your current VPS password. If you ever change your VPS password, you must re-run AutoLogon and update it. A mismatched password means Windows will sit at the login screen after a reboot, and your terminals will not start.

Manual Auto-Login (Alternative)

If AutoLogon is not available on your VPS, you can configure auto-login manually:

  1. Press Win + R, type netplwiz, and press Enter.
  2. Uncheck “Users must enter a user name and password to use this computer.”
  3. Click Apply. Windows will prompt you to enter the password for the account that should auto-login.
  4. Enter your password twice and click OK.

Part 2: Set Up MetaTrader Automatic Startup

There are two methods to make MT4 launch on boot: using the FXVPS StartupAdder tool (if available) or setting it up manually via the Windows Startup folder.

Method A: Using StartupAdder (FXVPS Servers)

FXVPS servers include a StartupAdder utility that scans for installed MT4/MT5 terminals and generates a startup script automatically.

  1. Open File Explorer and navigate to Local Disk (C:).
  2. Right-click StartupAdder.exe and select Run as administrator.
  3. A command prompt window will appear. Type y and press Enter to generate the startup file.
  1. StartupAdder creates a file called startup.cmd on the C: drive. This script launches all detected MT4/MT5 terminals in sequence.

Verify the startup file: Right-click startup.cmd and select Edit (or open with Notepad). You should see a line for each terminal, similar to:

start "" "C:\MT4_BrokerName\terminal.exe"
start "" "C:\MT4_AnotherBroker\terminal.exe"

The number of lines should match the number of MT4/MT5 terminals you have installed.

Best Practice: After generating startup.cmd, always open it and verify it lists all the terminals you want to start. If you install a new terminal later, re-run StartupAdder to update the file.

  1. Now copy startup.cmd to the Windows Startup folder:
    • Press Win + R, type shell:startup, and press Enter. This opens the Startup folder.
    • Copy startup.cmd from the C: drive and paste it into the Startup folder.

Method B: Manual Startup Folder (Any Windows VPS)

If your VPS does not have StartupAdder, you can configure startup manually:

  1. Press Win + R, type shell:startup, and press Enter to open the Startup folder.

  2. For each MT4/MT5 terminal you want to auto-start, create a shortcut:

    • Navigate to the terminal’s installation folder (e.g., C:\MT4_ICMarkets\).
    • Right-click terminal.exe and select Create shortcut.
    • Move the shortcut to the Startup folder you opened in step 1.
  3. Repeat for each terminal.

💡 Tip: Install each MT4/MT5 instance to a clearly named folder like C:\MT4_ICMarkets or C:\MT5_Pepperstone. The default installation path is the same for all instances, which causes confusion and makes it hard to identify which terminal is which in your startup configuration.

Method C: Using Task Scheduler (Advanced)

For more control over startup timing, you can use Windows Task Scheduler:

  1. Open Task Scheduler (search for it in the Start menu).
  2. Click Create Basic Task.
  3. Name it something like “Start MT4 - IC Markets.”
  4. Set the trigger to “When the computer starts”.
  5. Set the action to “Start a program” and browse to your terminal.exe.
  6. Finish the wizard.
  7. After creation, right-click the task and select Properties. Under the General tab, check “Run only when user is logged on” (this ensures it launches in your desktop session, not as a background service).

Task Scheduler is useful when you need to add a delay between terminal launches. Starting 5-6 terminals simultaneously can cause CPU spikes. You can create multiple tasks with different triggers — for example, “At startup” for the first terminal and “At startup + 30 seconds delay” for the next.

Part 3: Ensure EAs Resume Trading After Restart

Getting the terminals to launch is only half the battle. You also need your Expert Advisors to resume trading automatically. Here is how to make that happen:

Save Your Chart Profile

MT4 saves your chart layout, attached EAs, and indicator settings in a profile. Make sure your current setup is saved:

  1. In MT4, go to File > Profiles > Save As.
  2. Give the profile a name like “Trading” or “Live.”
  3. MT4 will automatically load the last active profile on startup, including all attached EAs.

Enable AutoTrading by Default

  1. In MT4, go to Tools > Options > Expert Advisors.
  2. Check “Allow automated trading”.
  3. Make sure “Allow DLL imports” is checked if your EAs require it.
  4. Click OK.
  5. Verify the AutoTrading button in the toolbar is green (enabled).

Best Practice: Enable “Allow automated trading” in Tools > Options > Expert Advisors, and keep the AutoTrading button active. Both must be on for EAs to execute after a restart.

Account Login Credentials

If your MT4 terminal requires you to log in to your broker account on each launch:

  1. Go to File > Login to Trade Account.
  2. Enter your account number and password.
  3. Check “Save password” so MT4 remembers your credentials.

Without saving the password, MT4 will launch but not connect to your broker, and your EAs will not execute trades.

Part 4: Test the Full Startup Sequence

Setting everything up is meaningless if you do not test it. Here is the procedure:

  1. Make sure auto-login is configured (Part 1).
  2. Make sure startup.cmd or shortcuts are in the Startup folder (Part 2).
  3. Make sure EA settings are configured (Part 3).
  4. Restart your VPS from the Start menu (Start > Power > Restart).
  5. Wait 3-5 minutes for the reboot to complete.
  6. Reconnect via RDP and verify:
    • All MT4/MT5 terminals are open.
    • All EAs are attached to the correct charts.
    • The AutoTrading button is green on each terminal.
    • Broker connections are active (check the connection status in the bottom-right corner of MT4 — it should show a green bar with the data speed, not “No connection”).

⚠️ Warning: Do not test during live market hours if you have open positions. Restart your VPS on a weekend to test safely. See our Windows Update scheduling guide for more on safe maintenance windows.

Part 5: VPS Password Changes

This is the number one thing traders forget. If you change your VPS password (which you should do periodically for security), you must update it in two places:

  1. AutoLogon — Re-run AutoLogon.exe and enter the new password.
  2. RDP connection files — Update your saved .rdp file or connection settings with the new password.

If you change the password and forget to update AutoLogon, your VPS will restart, sit at the login screen, and your EAs will be offline until you manually log in.

Best Practice: Use a unique, 16+ character password for your VPS and change it every 90 days. Never reuse your broker login password for VPS access — a compromised VPS password should never expose your trading accounts.

Troubleshooting

Terminals Launch But EAs Are Not Trading

  • Check that the AutoTrading button is green in each terminal.
  • Go to Tools > Options > Expert Advisors and verify “Allow automated trading” is checked.
  • Check the Experts tab at the bottom of MT4 for error messages.
  • Verify your broker account is logged in (File > Login to Trade Account).

Only Some Terminals Start

  • Open startup.cmd and verify all terminals are listed.
  • If you installed new terminals after running StartupAdder, re-run it.
  • Check that the file paths in startup.cmd are correct and the terminal.exe files exist at those locations.

VPS Stays at Login Screen After Reboot

  • Auto-login is not configured or the password is wrong. Reconnect via RDP, log in manually, and re-run AutoLogon with the correct password.

Terminals Start But Crash Immediately

Summary

Automatic startup is non-negotiable for any serious trading VPS setup. Configure auto-login so Windows goes straight to the desktop, place your terminal launch scripts in the Startup folder, save your EA profiles and broker credentials, test with a real reboot on the weekend, and remember to update AutoLogon whenever you change your password. Once set up correctly, your VPS will recover from any restart and resume trading within minutes — without you lifting a finger.

Need more help optimizing your VPS? Browse the knowledge base or check our pricing plans if you need more resources for additional terminals.