View Single Post
  #208 (permalink)  
Old 11-02-2009, 07:38 AM
derekc derekc is offline
Junior Member
 
Join Date: Sep 2006
Posts: 22
derekc is on a distinguished road
Auto monitoring the VPS

One of the risks using a VPS to run your Metatrader trading experts is that the server can go down for some reason and then your expert is no longer managing your trades without your knowledge.

I have been looking for a program that would automatically monitor the status of the VPS by pinging it regularly from another PC and if the ping reply fails then it should open up the backup Metatrader so the expert can continue managing the trading.

I found a way to use Dos to do just that very simply. In the attached Txt file you will find code that will ping the server IP address three times and if the third ping fails it will open up the Metatrader Terminal.

If you would like to try it out download the attached file and open it with notepad:
Replace xx.xxx.xxx.xxx with the IP address you would like to ping
Replace "C:\Program Files\MetaTrader - Alpari UK\terminal.exe" with the location of the Terminal.exe on your local pc you want to start. You can find the location by finding the Terminal.exe file in windows explorer and then right clicking the file, on the General tab you can copy it from the “Location”. If you want to start more than 1 terminal you can precede the file location with start "1", start "2" etc.

After adjusting as above save the file with a name “something.bat”.
Now schedule the file to be run on a regular basis by using Windows Scheduler: Start-> All Programs-> Accessories-> System Tools-> Scheduled tasks
Attached Files
File Type: txt autoping v1.txt (1.3 KB, 2 views)
Reply With Quote