Download MetaTrader 5

How do you deinitialise an EA?

To add comments, please log in or register
Are you a real pro? Share your knowledge with millions of traders!
Stephen Njuki
5180
Stephen Njuki 2013.05.20 15:23 
I am testing an EA that is taking too long by running over the entire test period for each pass despite running out of money at a much earlier time in some passes. How can I stop or terminate this EA during testing
Alain Verleyen
Moderator
30755
Alain Verleyen 2013.05.20 15:34  
ssn:
I am testing an EA that is taking too long by running over the entire test period for each pass despite running out of money at a much earlier time in some passes. How can I stop or terminate this EA during testing
Click on Stop button.
Stephen Njuki
5180
Stephen Njuki 2013.05.20 15:41  
I meant in code... but I have actually found a way around this. Just use


return;


My EA is not that bad ;-(
Tonny Obare
29335
Tonny Obare 2013.05.20 17:53  
Are you sure return; will terminate it during testing?
Stephen Njuki
5180
Stephen Njuki 2013.05.20 19:11  
It worked in my situation... and this was within OnTick()
Alain Verleyen
Moderator
30755
Alain Verleyen 2013.05.20 19:24  
ssn:
It worked in my situation... and this was within OnTick()
Return in onTick don't terminate (or deinitialize) the execution of an EA, it simply ends the current OnTick execution.
To add comments, please log in or register