Download MetaTrader 5

How do you deinitialise an EA?

To add comments, please log in or register
Stephen Njuki
5206
Stephen Njuki  
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
31472
Alain Verleyen  
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
5206
Stephen Njuki  
I meant in code... but I have actually found a way around this. Just use


return;


My EA is not that bad ;-(
Tonny Obare
33279
Tonny Obare  
Are you sure return; will terminate it during testing?
Stephen Njuki
5206
Stephen Njuki  
It worked in my situation... and this was within OnTick()
Alain Verleyen
Moderator
31472
Alain Verleyen  
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