I have the following situation:
I have a main strategy class which is derived from Strategy. There is nothing unusual about this strategy. Assume that it is any basic strategy.
This strategy has a collection of sub-strategies which derive from my custom interface IStrategy. These sub-strategies do NOT derive from NinjaTrader's Strategy. They contain custom code. I do pass the parent strategy to these sub-strategies, in their constructors. The idea is that on each call to OnBarUpdate() in the parent strategy, I loop through my sub-strategies to see if any of them trigger an entry signal.
In the sub-strategies classes, I declare some indicators.
Here is my question: How can I be sure that my sub-strategies' indicators are having their individual OnBarUpdate() methods called?
I have learned from my research that there is some magic that happens when an indicator is declared in the main strategy class (that is derived from Strategy) so that the indicator's OnBarUpdate() method is automatically called. BUT... how may I make sure that my custom sub-strategies' indicators are also updated?
Thanks!
Comment