Removing a EA when the program has an error

Back to topics list To post a new topic, please log in or register
avatar
11
zerosen 2015.08.23 11:13
 

is there a code that would allow me to remove the program or deinit the program if there is an error?

 example:

if(GetLastError() != 0)

{  

Alert("error"); 

exit EA, de initialize

 

Also, the error would come from the program trying to put a buystop/sellstop at a point that isnt allowed to put an order. So it could also be if the order fails.  

If there is no other way, is there a way to run the EA with minimal CPU? So that it would not lag the other EA that are running in other symbols

Thanks 

 

avatar
Moderator
3427
GumRai 2015.08.23 11:29 #
 
Look up ExpertRemove in the documentation
avatar
11
zerosen 2015.08.23 11:37 #
 
GumRai:
Look up ExpertRemove in the documentation
Thanks again !!
Back to topics list  

To add comments, please log in or register