Need a simple code (true or false), (on or off)

 

I need a simple code..

All I want is an external settings to be set up with two options (on and off) or (true and false)
When "true or on" the Expert works and continues to work
When it is false, the expert works but does not continue working after closing all open positions and pending orders. 

can anyone help me.

 
Mohamed Abdelwaged: can anyone help me.
Help you with what? You haven't stated a problem. Show us your attempt (using CODE button) and state the nature of your problem.
          No free help
          urgent help.