I'm passing in non-default price series to an Indicator. (I need adjusted HLC values).
I pass these in and then utilize them via a property as follows:
private ISeries<double> _lowSeries; [NinjaScriptProperty] [Browsable(false)] [XmlIgnore] public ISeries<double> LowSeries { set { _lowSeries = value; } get { Update(); return _lowSeries ?? Low; } }
However, I notice that if I try to access this property during Configure or Dataloaded; for example if needed as an input to ANOTHER indicator, that the call to Update() from the property results in OnBarUpdate running during the Configure / Data Loaded state.
This results in a failure if there are dependencies that have not yet been set up. Ideally calls to Update() which happen before State.Historical should be ignored and should not run OnBarUpdate.
I've managed to get around this by instantiating my internal indicator differently. But I thought I would report this. Clearly most people would never call it so early, but I think my use case is valid for doing so.
Comment