Creating Flexible Strategy Architecture in NinjaTrader 8
In the Architect framework, on every onBarUpdate, you call SetSignal, and in SetSignal, you say if EMSignal1BollingerIsOn, you then create the bollinger with "var bolinger = Bollinger(EMSignal1BollingerStDev, EMSignal1BollingerPeriod);"
My question is, if you create the indicators with every onBarUpdate, will it not increase the CPU usage and make backtesting slower?
Is there a way how you can add the Signal only one time to the strategy to prevent it from being created and garbage collected over and over?