Crash handling

 

Hey folks,

i am thinking about a recovery after a unexpected crash such as application crash or a power outage. So far i know yet, if a EA is assigned to a chart window and you reopen MT, it will still remain there and do there work. The question is, what is with the object variables. Does MT do a copy from memory and after a crash reassign the object to memory or does it start fresh and just assign the last assigned EA ? 

And another point of view is, how can i detect a crash. If you have a long term running agent, you will have a set of calcution with a good set of precision but with a fresh start it will change. If i could detect a crash, then i can use other initial values to restore values and continue with trading.


Regards, Chris

 

Christian Stern: i am thinking about a recovery after a unexpected crash such as application crash or a power outage. So far i know yet, if a EA is assigned to a chart window and you reopen MT, it will still remain there and do there work. The question is, what is with the object variables. Does MT do a copy from memory and after a crash reassign the object to memory or does it start fresh and just assign the last assigned EA ?

And another point of view is, how can i detect a crash. If you have a long term running agent, you will have a set of calcution with a good set of precision but with a fresh start it will change. If i could detect a crash, then i can use other initial values to restore values and continue with trading.

Do some research into "Global Terminal Variables", but remember to always "flush" them to disk.
 
Fernando Carreiro:
Do some research into "Global Terminal Variables", but remember to always "flush" them to disk.

Do you know of a check-in service? For example, I would program my EA to use webrequest to post a check-in to a web API and if for some reason the EA didn't check-in - the check-in server would alert me of a possible issue?

 
nicholishen: Do you know of a check-in service? For example, I would program my EA to use webrequest to post a check-in to a web API and if for some reason the EA didn't check-in - the check-in server would alert me of a possible issue?

Yes! MyFXBook offers such a service with their Account Update/Tracking EA! It's called "Account Update Failure Notification" in the Portfolio Account setup section.

Alternatively, create your own website on some service provider to do something similar!

 
Fernando Carreiro:

Yes! MyFXBook offers such a service with their Account Update/Tracking EA! It's called "Account Update Failure Notification" in the Portfolio Account setup section.

Alternatively, create your own website on some service provider to do something similar!

Awesome good to know thanks! 
Reason: