Just thought I'd post some info on how to keep your MT4 running sweet on a VPS.
Personally I've had quite a few issues with both MT4 crashing and the VPS randomly rebooting. When you're running EAs and trying to make money this can be very annoying!
Even if you've got a very reliable VPS provider your VPS will still go down occasionally, and there's no way that any provider would cover your financial losses in the event that your trades were compromised as a result of MT4 not running for whatever reason.
So without further ado:
One commonly advised way is to simply add MT4 to the "Startup" folder to ensure that it's started each time the server is rebooted. However this doesn't work on VPS servers because Windows doesn't execute these programs until you've logged-in to your REMOTE DESKTOP session. By that time MT4 could've been down for hours.
There are also applications available such as "Always Up" and "FireDaemon" which enable you to run MT4 as a Windows SERVICE rather than as an application. Although this will ensure that MT4 restarts after it crashes or after the VPS is rebooted, it is not an ideal solution. The main reason is that some apps are not designed to be run as Windows services and can play havoc with memory allocation.
I think I've found a better solution:
The solution involves the following steps:
1. Ensure MT4 is set to "Save your password" and "Automatically log-in at startup"; to do this:
- In the MT4 account login dialog, tick the "Save account information" option.
- In the MT4 Tools/Options dialog, select Server tab and ensure "Keep personal settings and data at startup" is ticked.
2. Purchase and install "LogonExpert" from
http://www.logonexpert.com. This app will ensure that the VPS always logs-in to Windows after a reboot.
3. Locate the shortcut icon you use to launch your Remote Desktop Connection and replace only the word "mstsc" in the "Target" field with the following text string:
mstsc.exe /v:servername /admin
(where "servername" should be replaced with the IP address of your VPS).
Doing this will ensure that you get logged into the main console session, rather than the remote desktop session. If you don't complete this step, LogonExpert will not work on your Remote Desktop session.
3. Install "Application Monitor" by Jockersoft (donationware) at
http://www.jockersoft.com/english/appmonitor_index.php. You can give it a list of applications to constantly monitor. If it discovers the application isn't running it will restart it.
4. Add MT4 to the list in "Application Monitor". Set it to check at regular intervals, say 5 minutes or similar.
5. Add Application Monitor to your startup folder.
Simples!
Now MT4 will not only be restarted every time it crashes, but also every time the VPS is rebooted.