In the below scenario, please advise whether the code "IndicatorB.Update()" is required (I was of the understanding it should not bet, however I may be missing something):
- you have two indicators, IndicatorA and IndicatorB,
- IndicatorA hosts an instance of IndicatorB, and
- IndicatorB OnBarUpdate must trigger with each BarUpdate.
Within IndicatorA....
private IndicatorB _indicatorB; protected override void OnStateChange() { if (State == State.Configure) { var isCalledFrom = Name; var period = 8; _indicatorB = IndicatorB(isCalledFrom, period); } } protected override void OnBarUpdate() { // _indicatorB OnBarUpdate only appears to be triggered with the // inclusion of the below line. _indicatorB.Update(); }
Shannon
Comment