Part 2 – How To Set Up Your New Google Cloud VPS To Run MT4 Robustly


Welcome back to part 2 of our guide on setting up a VPS on Google Cloud to run MT4. If you have missed out on our earlier article, you can find that here:
How To Create a Free VPS on Google Cloud for MT4 EAs

In our previous article, we have successfully set up a new VPS on Google Cloud. Now, we will proceed to set up our new VPS such that it will

  • Prevent Windows Update from running without our explicit action
  • Automatically log in and keep MT4 running if/when our VPS reboots due to a crash or other reasons

This is extremely important so as to ensure an almost 24/7 uptime, which is mandatory for automated algorithmic trading.

Step 1 – Setting up Taskbar Preference:
Firstly, let’s tidy up the taskbar buttons. Right-click on Taskbar (the grey bar at the bottom-most), then check and select the following:

This allows you to see all the programs running at the bottom without the taskbar buttons combining, especially useful when you are running multiple MT4 instances.


Step 2 – Turning off Windows Update:
Next, we want to turn off Automatic Windows Updates, as we definitely do not want our VPS to be rebooted after a Windows update at some arbitrary time. All commercial VPS providers for forex trading turn off automatic Windows updates by default. Do make sure to update it on your own once in a while when the markets are closed (e.g. weekends).

To do that, click on Start, type in “Run” in the search box and press ENTER. Then type in “gpedit.msc” in the Open field, and press ENTER:

In the Group Policy Object Editor:
– expand Computer Configuration
– expand Administrative Templates
– expand System
– expand Internet Communication Management
– double-click Internet Communication settings

Then look for “Turn off access to all Windows Update features”, double-click it, select “Enable” and click OK. You should then see this:

This effectively turns off all attempts by Windows Update to update your VPS, hence do make sure to perform updates on your own when the situation allows!


Step 3 – Turning on AutoLogon:
Download Autologon for Windows v3.10 (link here). This is a free software that is written by Sysinternals, a wholly owned subsidiary of Microsoft and is now a part of Microsoft Technet.

Unzip and copy the files into your VPS, then execute the “Autologon” application. You should be asked whether to allow the program to make changes to your computer, click Yes to that, and agree to the Terms and Conditions on the next prompt.

Next, key in the VPS password in the password field, the Username and Domain fields should be automatically be filled in:

Click Enable, and you should get the following confirmation. Notice that your password is encrypted when stored in:


Step 4 – Install MT4:
Get the MT4 installation file from your broker, copy it to your VPS and install it.


Step 5 – Adding MT4 shortcut to the Startup folder:
Click the Start button, then type “shell:common startup” in the search box. You should get only one result which is the Startup folder. Click on it:

Assuming that the MT4 icon is found on your desktop after the MT4 installation above, simply drag that icon into the startup folder.
You are done! The next steps will be to install your EAs accordingly. You can find our EA installation guide here:
Support & FAQ

Now, in the event that your VPS reboots itself, it will now automatically log in, and fire up the MT4 platform. If you have any EA that is already installed and running, they will then continue to run. One point to note is to make sure that your MT4 account’s Master password has not been changed recently. If yes, make sure to log in to MT4 using your new password, and let MT4 remember the password.

Alright hope that helps! Do also check out our preferred broker IG (click here). Listed on London Exchange, they are among the largest forex and CFD broker worldwide. We are currently running our algorithmic trading systems on IG live accounts, performance can be seen here: myfxbook – GS Alpha Bundle Portfolio

Comments (6)

Thank you very much…. great work you did… just one question. what will happen if i keep my EA open on current OS ? will it affect my VPS MT4 EA?
do i need to stop my EA on current system?

Welcome Adil! And just to clarify your question, do you mean that you want to keep your EA running on your current VPS, while also running it on the new VPS that you create on Google Cloud? If that is your question, you definitely only want your EA to be running only on one VPS, either your existing VPS or the new VPS that is just created. Running on both VPS at the same time would mean that you are effectively running two copies of your EAs, and may result in double the positions (and other complications, depending on how your EA was written).

Hope that helps, cheers!

Hi Terence Tan, Sorry I couldn’t correctly explain myself. I have only one vps running i.e google cloud VPS that I just set and it’s running perfectly. Now I’m talking about my current system(Laptop). I have my metatrader4 terminal installed on my laptop and of course i used it since i started trading but now my VPS is set so I don’t have to keep my laptop’s mt4 running. Thanks for amazing tutorial. The real question is if i open my laptop’s mt4 terminal and have autotrading enabled with same EA as on my VPS, will it open double positions? and to avoid double positions if i disable autotrading on my laptop’s mt4 terminal which has same broker account as on my VPS terminal, closing EA on laptop will affect my VPS’s terminal EA?
Again thanks for great tutorial.

I get it, yes it will result in double execution if you run the EA both on your laptop’s MT4 as well as the MT4 within the VPS. My suggestion is to disable autotrading on your laptop’s MT4 like you said, so that the executions from the EA only comes from the MT4 within the VPS. And of course, do keep an eye on it for a few weeks after everything is setup, just to make sure that it is running as expected. Cheers!

Hi Terence, thanks for the good sharing & solution to the Free VPS google re-start owing to windows automatic update.

I have 1 doubt in the unfortunate event when the VPS re-boot itself,

Doubt # 1 : if my MT4 still running martingale type EA, even with Autologon for Windows v3.10 able to auto logon and according to Step 5 – Adding MT4 shortcut to the Startup folder & my MT4 can re-start …. somehow, the EA will not able re-call the last martingale level before MT4 is OFF.

My thinking is the EA will start-over again. My opened positions will open to a risk that if no bigger position can be opened during MT4 = OFF and trending of that pair continue on even with some pullback but unable to pullback to the averaging Take profit level since the EA has missed the golden chance to open at higher level of martingale lot. Is my thinking = correct ?

If there anything that we can do in order minimize this risk ? please advise

Glad you found it useful! Regarding your concern, a good EA will need to be able to perform self-recovery in case it gets rebooted (checks for existing positions, handles them, etc). Thus if the EA was not able to re-call the last martingale level, then it is prudent to contact the author of the EA to include that feature in.

Bottomline is this, a VPS (any VPS really, be it from Google Cloud, AWS, BeeksFX, etc) can and will get rebooted at some point in time in future. When that happens, all scenarios need to be catered for and handled by the EA. At the worse scenario where the EA is unexpectedly turned off/shut down (due to any imaginable/unimaginable circumstances), the live positions should accumulatively have a max risk which should only be a small percentage of the account balance/equity.

Lastly, any chance that I can talk you out of using a martingale type EA? 🙂

Leave a comment