You could try to put into the code the conditions that would cause you to change your strategy. Then when all those conditions are in place you send a signal to all cells to change strategy.
Your code then looks at the strategy variable to see which code path to execute.
Your code then looks at the strategy variable to see which code path to execute.