how to automate process of rebooting MT4 - page 2

 
WHRoeder:
  1. 7bit:
    Be creative. Use it so start "taskkill /im teminal.exe" and then start terminal.exe again. Or use it to start a script (or a batch file) that does these two steps.
    Exactly. I would have the EA periodically write a file to say it's alive. and have a scheduled (or always running) batch file check if the file exists and delete or if not exists, kill and restart. (handling the week end/holidays would be a problem.)
  2. I consistently received the "Trade Context Is Busy" error.
    Your EA's should use a semaphore to prevent these.


1. And taking it one step further to ensure one's VPS is operational and MT4 and the EA are running I've contemplated creatin a heartbeat function which writes to a file which is then checked from an external alerting service. The file would have to be made available via HTTP so that would require running IIS which takes up additional resources. I'm looking for good ideas on a robust heartbeat and external monitoring solution for MT4 EAs. Surely some folks have tackled that.

2. I was seeing this problem with MANUAL (non-EA) trading. The only solution was to reboot. If the state client is this "screwed up" would a semaphore in an EA really solve the problem?

 
ubzen:

Windows Scheduled Task might help.

Thanks ubzen!

Does this work for Buru (www.burutrader.com) as well and can set it up that it starts trading automatically after booting?

That means:

1st Start Buru

2nd Start Trading (it trades than by itself)


Thanks a lot for your help.

Reason: