My strategy works fine on a chart, but when I run it through the Analyzer I end up with "Indicator 'MyIndicator': Error on calling 'OnBarUpdate' method on bar 5: Object reference not set to an instance of an object."
I started to debug the issue and tracked to what I thought was the "Time[0]" call, which was the cause. Then I removed the line and it got stuck at other objects. I compiled under the debug and captured a "Time Out" operation error. Looks like these values were not create (Time for example) due to the time out in the analyzer.
I also debug it further to know it isn't the first round of parameters tested. That is the first run of the strategy per thread. That run is fine (7 or 8 threads on my system), but the very next group of parameters fail with this error. Certainly NT8 could give better error guidance from the get go and might be good feedback, but what is causing the time-out in the analyzer.
I know the Strategy Analyzer will work with the Simple MA Crossover strategy so it if something it doesn't like about my strategy.
Any hints?
Comment