Solution to computer restarts, keep those EAs running

 

IM a relative new member here, Thanks for all the good work

Here is my contribution to you all:

I'm sure im not the only one to be plagued by automatic computer restarts when running multiple demo/live EAs. VPS are more susaptable to this.

I've had my share of sleepless nights over this.

But I feel i've made an breakthrough on this (last night!!)

Prob: computer/ VPS restarts when you are not around and all EAs stop working until you login much later... EA Results stuffed up once again!

Soln 1: Put MT4 shortcut into start programs.

:- naive solution, programs dont start until you login. (more on this later)

(BTW windows scheduler has the same issue, been there done that)

Soln 2: Make MT4 (terminal.exe) into a service (a windows support process). This will run in the background and EA will place trades, even when you are not logged in!

prob: you cannot interact with the service, ie you cannot use the mouse and keyboard on it and cant see it on the desktop (but it is still running).

soln: Go into Services control panel and check properties to tick "Interact with desktop"

You can implement this soln using many softwares such as Applicationasservice.

Check for more in www.download.com search 'application as service'.

OR, if you like tinkering with registry you can try this link:

http://www.hostmysite.com/support/vps/windows/service/

it works for VPS, should work for PC... pls try at your own risk and use grey cells.

:- problem solved for standalone PCs and home servers!!

But this doesnt work for VPS guys like me

Soln3: (aka eureka last night!!)

Instead of doing all of the above (and ive done them all, I wish someone had told me earlier)

Have the computer to AUTO LOGIN on restart!!!

This way, you put all the progs you need in startup folder (or make a batchfile) and MT4 will run on any server restarts, intentional or unintentional. you dont have to login!!.

Auto Login, Here's how:

1.Click Start, click Run, and type control userpasswords2.

2.Clear the Users must enter a username and password to use this computer check box.

3.Click Apply.

4.Enter the user name and password you wish to automatically log on with, and then click OK.

5.Click OK again and you're all done.

Prob: Your server can now be accessed by anyone who walks by your computer...

Soln:

Make a shortcut to lock your compute and place it in the startup folder along with your MT4 shortcuts!!

Heres how:

Right click an empty area of your folder, choose New/Shortcut and enter this line as the command line:

rundll32.exe user32.dll, LockWorkStation

Voila, computer locked and running all your EAs everytime...

I hope this helps anyone who needs it, i struggled through these steps....

I will post any issues if I come accross them.

regards,

 

Thanks a lot. It may be usefull as many people asked this question.

 

good post... I tried a VPS service and was very disappointed. I really prefer linux to windows and am back to using MT4 in linux ... no silly reboot problems here

Last hurdle is to get history center working (for backtesting)

 

I'm yet to fully understand the problem. Is this for computers/servers located remotely that require having automatic updates turned on? Are the restarts you mention due to Windows Automatic Updates? I appreciate the article but if this is the only reason to use this for now I'm happy just changing my auto updates settings to manual update.

 

For me it had nothing to do with automatic updates (they were turned off and tried manual too). Tech support wasn't much help....

 

The restart problem is generally with windows based VPS. They do not support pagefiles(or it is turnedoff by all providers to make u upgrade). So if u run too many EAs or start having memory leaks, the VPS manager starts squezing ur processes or killing them. if an imp service gets choked, it can prompt a restart.

OR, the provider has put too many VPSs on one node.

this is my gut feel.

this is more prominent on entry level 30-50$/mth VPS, then the higher end ones. guess which ones i use....

btw,

how do you run windows based MT4 on linux, I dont care much for backtesting on it. I know some people have done this.

 

MT4 runs under wine in linux

wine is a windows API for linux (you can run some windows programs in linux)

info on wine : http://www.winehq.com/

 

thanks,

I will try this in the future. Linux based VPS tend to be cheaper too.

regards,

 

A question about VPS

How secure do you think they are? Would you use them on your real account if it has 5-6 digit amount of $ in it? Wouldn't you be worried about a junior employee taking a pick at what do you use the PC for?

 
InTrance:
How secure do you think they are? Would you use them on your real account if it has 5-6 digit amount of $ in it? Wouldn't you be worried about a junior employee taking a pick at what do you use the PC for?

If that happened it must be a pretty pathetic company. I would think their entire business would be geared towards preventing that from happening. They should have complete login logs and ready to show you at request. I believe the point of a VPS is also to prevent this. You do not need to give them your OS password and have control of your own login logs. But I've worked in IT and know how quick people are to steal source code and what not if they have the chance. I don't see how they could take your money even if they could log into your account. I believe what most people what to protect is their EAs.

 
InTrance:
How secure do you think they are? Would you use them on your real account if it has 5-6 digit amount of $ in it? Wouldn't you be worried about a junior employee taking a pick at what do you use the PC for?

You are right, i worry about security too.

I have worked with 2 vps companies and each time i need submit a query ticket, i am asked for my login and password. Everytime.

Im thinking abot this too, dispite a companywide culture, its easy for an employee to steal.

I'm currently running demos on the vps but the EAs are the same.

I plan to

1. not store the mql file online.

2. Maybe put a password or a my account number input into the the EA so that it will exit if they dont match.

3. Maybe i will also put an encryper in there so the stored files are encrypted.

All this should be enough.

Im not doing any of this at the moment except the first bullet.

Its an issue, but not a deal breaker. VPSs have lots of advantages..

regards, Tushar