How to stop the EA?

 
Hello, I need your help. What I want from the EA is that as the Margins arrive to a specific bottom it will stop adding new trades and stop executing. How to do it, Please.
 
if( ... ) ExpertRemove();
 
thanks
Reason: