Download MetaTrader 5
To add comments, please log in or register
Having questions to the author of an article? Discuss them on the Forum!
GregorAnton 2014.12.10 06:54 

Is there a DeInit type of handler for scripts?

 I have a script that is in a loop until a condition is met.  It creates a text object to say "Script Running".  When the condition is met I can delete that objects.  HOWEVER, when I exit the script manually, the text object remains.  DeInit doesn't seem to be called.  Is there any other way or handler to do some "clean up" upon manual stopping of a script? 

Halley 2014.12.10 07:14  

How do you terminate the script - by timeout or by a checking IsStopped ?

BTW, the script is a single method - from my point of view the OnDeinit is redundant, everything can be included in the single method.

To add comments, please log in or register