Now I am trying to use "Forecast2" forecasts in an automatic trading Strategy. Even though "Forecast2" runs without error when attached directly to a chart, merely setting a reference to it during (State == State.DataLoaded) in the Strategy results in the following NT log and trace file error records:
"Indicator 'Forecast2' : Error on calling 'OnStateChange' method: Object reference not set to an instance of an object"
1) The fact that "Forecast1" can be used by the Strategy and "Forecast2" cannot suggests that the problem is related to "Forecast2" using an array of "Forecast1" indicators. Is that a known limitation?
2) Do you know a technical difference between attaching an Indicator to a chart and referencing it in a Strategy that could cause it to work one way and not the other (such as maybe a processing thread difference)?
"Forecast2" code obviously could be embedded in the Strategy, but I would rather not do that, because it is complex and I would like to avoid having to synchronize and test future changes in multiple applications.
Comment