VPS Setup Tools



Hey there!

On this page you will find all of the necessary tools as seen in the Bulletproof VPS Set Up Course. Feel free to copy the code or download the attachments – whatever works for you.


I am making you aware that this setup is not a guarantee of 100% uptime of your VPS, it is also not a guarantee that your VPS will work correctly. This is just a procedure I have devised for setting up MY Virtual Private servers. This procedure as well as the tools and scripts involved may contain errors. Any information is provided ‘as is’ solely for informational purposes and is not intended for trading purposes or advice. Past performance is no guarantee of future results. If you choose to proceed with these tools and VPS setup procedures, you are doing so at your own risk.

What is Forex VPS?

If you are not familiar with VPS Servers and their importance in Forex trading, then the video below will be a great explainer for you. Simply enter your email and play it now!

Windows Autlogin Tool

This tool automatically logs into Windows if the system is rebooted.

You need to create a text document on your VPS desktop named “Regsetup.reg.txt”, then copy the following code into the file:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

Once done, save the file and rename it to “Regsetup.reg“. This will turn it into a registry file.

Download prepared file: Regsetup

Rebootlog Tool

This tool automatically documents any reboots of your VPS, so you can investigate these if logs if there is ever an issue.

You need to create a text document on your VPS desktop named “Rebootlog.cmd.txt”, then copy the following code into the file:
echo --------------->> C:\rebootlog.txt
echo last reboot at:>> C:\rebootlog.txt
date /T >> C:\rebootlog.txt
time /T >> C:\rebootlog.txt

Once done, save the file and rename it to Rebootlog.cmd”. This will turn it into an executable command file.

Download prepared file: Rebootlog

MetaTrader 4 AutoLaunch Tool

This tool automatically launches all of your MT4 terminals if the server was restarted for whatever reason.

You need to create a text document on your VPS desktop named “MetaTrader4AutoLaunch.cmd.txt”, then copy the following code into the file:
rem *************************************************
rem *** This starts the terminals after waiting 30 seconds ***
rem *************************************************

ping localhost -n 30
start "1" "C:\Program Files (x86)\MetaTrader 4\terminal.exe"
start "2" "C:\Program Files (x86)\MetaTrader 4 - Demo2\terminal.exe"

Add as many lines as required. Each line should represent a separate MT4 folder installed on your VPS.

Once done, save the file and rename it to “MetaTrader4AutoLaunch.cmd”. This will turn it into an executable command file.

Download prepared file: MetaTrader4AutoLaunch

Watchdog Tool

This tool will automatically monitor the status of your MetaTrader’s connection to the trade server. If a disconnection occurs, the tool will attempt re-login to the account set up in you favourites.

You need to create an expert advisor in your MetaTrader 4 named “Watchdog” and copy the following code into it:
//| WatchDog.mq4 |
//| Copyright, Kirill |
//| http://www.ForexBoat.com |
#property copyright "Copyright, Kirill"
#property link "http://www.ForexBoat.com"
#property version "1.00"
#property strict

extern int AccountRow = 1;
extern int DelayMinutes = 2;

// AccountRow - Your favourites account number
// DelayMinutes - Delay in minutes, has to be greater than the chart timeframe

#include <WinUser32.mqh>
#import "user32.dll"
int GetParent(int hWnd);
int GetDlgItem(int hDlg, int nIDDlgItem);
int GetLastActivePopup(int hWnd);

#define VK_HOME 0x24
#define VK_DOWN 0x28
#define VK_ENTER 0x0D

#define PAUSE 1000
datetime Old_Time=0;
bool is_reconect = true;

void OnInit()

void OnTick()
if (!IsDllsAllowed())
Alert("Watchdog: DLLs not alllowed!");

while (!IsStopped())
if (Old_Time == iTime(NULL,0,0)) is_reconect=true;
else is_reconect=false;
if (is_reconect)
Print("Watchdog: The chart has not been updated in " + string(DelayMinutes) + " minutes. Initating reconnection procedure...");

void Login(int Num)
int hwnd = WindowHandle(Symbol(), Period());
int hwnd_parent = 0;

while (!IsStopped())
hwnd = GetParent(hwnd);
if (hwnd == 0) break;
hwnd_parent = hwnd;

if (hwnd_parent != 0)
hwnd = GetDlgItem(hwnd_parent, 0xE81C);
hwnd = GetDlgItem(hwnd, 0x52);
hwnd = GetDlgItem(hwnd, 0x8A70);

PostMessageA(hwnd, WM_KEYDOWN, VK_HOME,0);

while (Num > 1)
PostMessageA(hwnd, WM_KEYDOWN,VK_DOWN, 0);

PostMessageA(hwnd, WM_KEYDOWN, VK_ENTER, 0);

hwnd = GetLastActivePopup(hwnd_parent);
PostMessageA(hwnd, WM_KEYDOWN, VK_ENTER, 0);


Once done, save and compile the file. Alternatively, you can copy the prepared file (after unzipping) into your terminal’s data folder \MQL4\Experts. 

Download prepared file: WatchDog

That’s all the tools you will need to setup a VPS server in a way to increase its resistance to failures. Remember, if you’re not already signed up for the BulletProof VPS Course – then you can register and find out how all of these tools work together to protect your Virtual Private Server from any issues.

Good luck!


2 Responses to “VPS Setup Tools”


March 20, 2016 at 11:34 pm, PAWEL said:

Thank You ….Very helpful



April 02, 2017 at 3:47 pm, bud said:

If any one has problems with the auto log in option (under MS 2012 R2 etc). just go ahead and download: Autologon for Windows v3.10

finding the data folder for the watchdog with in MT4 is piece of cake by clicking, file, open data folder.


Leave a Reply

Your email address will not be published. Required fields are marked *

as seen on: