Tuesday, April 6, 2010

Using Your VPS - Steps for True Reliability

Everybody who has been involved in automated trading for a while knows that one of the first needs which demands to be fulfilled in order to run a smooth and successful expert advisor operation is the aqcuisition and use of a Virtual Private Server (VPS). These servers make trading reliable in the sense that they free the trader from having to run the experts within his or her computer, providing lightning fast connectivity with minimal latency, triple redundant internet connections and 99.99%+ uptime guarantees. However there are several problems related with Virtual Private Servers which may make their running confusing to the user. Particularly problems related with duplicate instances of users are common amongst new VPS owners, on today's post I will discuss the causes of these problems and the simple solutions which have to be implemented in order to guarantee up time and the reliable execution of the trading systems used.

In order to understand the problems inherent to the use of a VPS we must first understand how a VPS actually works. The server usually has a given number of users, opening sessions for them remotely so that they can access the dedicated computer allowing each user to access files, open applications, etc. Usually a VPS user will be loaded with metatrader 4 instances in its startup menu so that the programs are run automatically when the user logs in, this way the user can simply disconnect and leave the programs running. However, when users reconnect to the server using the windows remote desktop utility the program may request the opening of an additional session (instead of opening the current one) effectively making the server run duplicate instances of all metatrader 4 platforms upon login. In the ends the effect will be that all platforms will have duplicate instances which will generate duplicate trades.

You can easily see if there are several users running by accessing the task manager by pressing Ctrl+Shift+Esc when you're logged into your VPS. After the manager appears, go to the "users" tab, there you will be able to see other users and disconnect/connect or log them off completely from the server. This will effectively let you correct the problem of duplicate users once it has already happened. However, to prevent the appearence of duplicate users you must log into your VPS using "console mode" instead of the usual mode used by the Windows Remote Desktop Utility. In order to do this you can use the Royal TS remote Desktop Connection software which allows you to configure sessions and access your VPS through "console mode". When accessing through this mode, the software requests the opening of previously opened sessions of that user, therefore completely eliminating the problem of duplicate sessions being opened.

Another very common problem people face when dealing with a VPS is the fact that these servers are Windows based and therefore they have to be restarted frequently (once or twice a month) to install windows updates. These updates are usually run massively across the data center and your VPS is rebooted without any notice. Most VPS providers have grown aware of the metatrader crowds and they have moved their reboot schedules to Saturdays but the problem remains that all your sessions and metatrader instances will be shut down and failure to restart them will mean that your VPS will quit trading.

The solution to this problem is simple, your VPS needs to auto-login after a computer reboot something which can be done in several ways. The first way is to add your login information to the registry and enable auto-login something which is NOT recommended since your login information is stored in plain text form in the registry and it can be easily hacked from your computer. The best solution is to find an encrypted login solution, like the software provided by logonexperts.com, which allows your VPS to login automatically while maintaining your login information safely encrypted. There is also a third approach which starts the metatrader 4 terminals as "services" which run without any user having to login and they are then attached to the first user which logs into the platform. A piece of free software called CNS Autobot is able to set this up when installed in your VPS. However I have to confess that I have not tried this approach yet (however I will in the near future) reason why I cannot talk about its reliability.

As you see, even though having a VPS is a step towards reliable automated trading execution, several measures have to be taken in order to guarantee the server's reliability and continuous trading, by solving and checking for the problems I have mentioned you will be able to guarantee to a large extent that your VPS will be trading and executing your strategies in a reliable fashion. If you would like to learn about automated trading system strategies and how you too can succeed in automated trading by using sound, reliable trading tactics please consider buying my ebook on automated trading or joining Asirikuy to receive all ebook purchase benefits, weekly updates, check the live accounts I am running with several expert advisors and get in the road towards long term success in the forex market using automated trading systems. I hope you enjoyed the article !

1 comment:

Maxim said...

Daniel, I'm using the VNC software which has the following advantages:
1. It will always connect to the current Windows session, thus preventing multiple login issue completely.
2. It uses more lite protocol for the connection: it happened a lot of times that Remote desktop connection failed while VNC succeeded.

I use the Remote desktop only for passing files between the home and the VPS computer.

Additionally, it is worth to create a limited user and to run metatrader from that user,-there is no single reason to be administrator on the machine, connected to the internet since all the viruses, spams, spies etc get the credentials as those of the logged in user.


Daniel Fernandez's Expert Author Email Alerts
Sign up to receive email alerts of Daniel Fernandez’s latest articles from EzineArticles.com!

Email Address: