A) Twice when StrategyAnalyzer is started. I can understand why this might be needed once, but why twice?
B) When changing the selected strategy.
C) When Backtest type combo is changed.
D) Every time a strategy is run (Backtest type = Standard).
E) When backtest type is changed.
F) If instrument is changed.
G) If Data Series Type is changed.
H) If Order Fill Resolution is changed.
I) If Set Order Quantity combo is changed.
At the moment I dont have many strategies in NT8 or much code in SetDefaults, but unnecessary instantiation of things I dont need right now seems to be asking for problems.
Lets say I wanted to connect to another slow-to-respond application in a strategy. If I did this in State.SetDefaults then that would slow down testing of all other strategies. I suppose that sort of thing needs to go into State.Configure instead?
Comment