How to deactivate in code specific strategy.

 

How would I deactivate specific strategy in code without affecting other strategies. I have about 7 different strategies on 1 ea and it’s taking enormous computing  resources with just 3 open charts. What do you all recommend. As I already have true/ false of strategy but calculations probably continue in background. What code could I add before and after specific strategy to deactivate.


thanks everyone 

 
You may generally optimize the code - does it need all calculation at every tick or some can be done once per bar, does it recalculate non-necessary historical data, etc.
 
Thank you both.
Reason: