For those interested in setting up a VM (VPS) service, here is...

  1. 2,335 Posts.
    lightbulb Created with Sketch. 536
    For those interested in setting up a VM (VPS) service, here is what I do! Hope this is helpful to some.

    I don't advocate that this is the best, fastest, or even most reliable solution, but it's "free" and it is running my EAs on demo accounts just fine (I won't attest to latency/slippage impacts of this solution compared to other VPS options out there as I haven't tested this properly yet). I say "free" because you have to sign up with credit card, but Google gives you around $450 free credit to use over 12 months which is very generous and they won't charge your credit card once you run out of free credit until you set up a proper plan, so no risk there IMO. $450 is about ~10-11 months of free VM. This credit can be used across the entire Google Cloud Platform I am pretty sure, so there if VMs aren't your thing check out the other cloud services they offer, some of it is interesting.

    https://cloud.google.com/ - this is where you sign up.
    https://robotwealth.com/run-trading-algorithms-google-cloud-platform-6-easy-steps/ - here is decent guide I found with step by step instructions of the setup.

    That article also provides some good general information and considerations about using the VMs, so worth a read. It doesn't go into much technical detail however, so I will add some further remarks (high level, I can go into more detail on any of this if there is interest);

    General
    1. When you set your MT4 terminal up, if you aren't actively intending to trad on it or do back testing, be sure to set all bars on chart and in history to a much lower number (this will make your MT4 run a lot more efficiently) - just be careful your models don't need more bars on chart than you have allowed

    2. Turn MT4 alerts (notifications/sounds) and news off - unless you are reliant on alerts from any of your EAs

    3. Plug your MT4 terminal ID into your MT4 app on your phone and you can set up alerts with details of every trade taken (I use this more to know my terminal is still alive and placing trades, not because I necessarily care about the individual trades, it's my 'finger on the pulse' so I don't have to check it daily)

    4. Change windows settings to not automatically update (and therefore, not automatically restart your server when updates are out, interrupting your EAs)

    5. Set your MT4 terminal to run on startup (if there are any outages/restarts at least MT4 will relaunch and keep running on startup)

    6. Download an autologin app for windows (again, if there are any outages at least you will be automatically logged into your windows profile, and then MT4 will re-launch as per above)

    Technical
    1. Don't skimp on vCPU in "Machine type", go for standard, at least 1vCPU and do not do shared core. I think 1VCPU is enough, if it's too slow adjust the memory. If you're using the VM for back testing I am fairly sure MT4 only utilizes 1 core, so 2 is useless anyway. MT5 and other platforms might use more than 1, you'll have to look it up.

    2. I think MT4 runs well (best for price maybe?) on Windows Server R2 Datacenter, I use 2012 as I was once told this is all you need to efficiently run the terminal, but 2016/2019 probably work better too - just trying to stretch my free dollars as far as they go! There might be a better option, but this is what I use for now.

    3. It might not make a huge difference, but call your broker and confirm where their actual servers live - try to pick a VM host location closer to that if you can (hopefully its in the same country).


    And that's about all I can think to say on the matter.
 
arrow-down-2 Created with Sketch. arrow-down-2 Created with Sketch.