which function do I use to kill the EA when a certain condition is met ?

 
 

If you kill the EA, it can't trade ever again. Is this really what you want?

Otherwise, just return from start until the condition no longer exists.