Problem:
I want to create a Strategy that should catch enable/disable of other strategies in the terminal. Lets call it "Strategy0".
For example, if I add a new "Strategy1" - in the "Strategy0" log I want to catch the event "Strategy1 is added". As soon as I enable Strategy1 - in the Strategy0 log I want to catch the event "Strategy1 is running". As soon as I disable Strategy1 - in the Strategy0 log I want to catch the event "Strategy1 is stopped", etc.
I managed to get access to the Strategy1 State from Strategy0, but I can’t find the event that needs to be caught (the moment of changing the Strategy1 State):
void TryToCatch(){ foreach(StrategyBase str in myAccount.Strategies){ Print("STR:"); Print(str.GetType().ToString()); Print(str.Name.ToString()); Print(str.State.ToString()); } }
How can I solve this problem?
Comment