I had been writing some strategies and indicators earlier in the year. I had to stop because of .Net SP1 was not working with NinjaTrader. Thankfully (and as promised), the end of year version you've released resolves that.
Now, back to my strategy problem. Unchanged strategy code now no longer runs a backtest. I get this error:
ERROR: Failed to call method 'Initialize' for strategy 'bbStochCrossOver': 'DrawHorizontalLine' method can not be called from within 'Initialize' method.
I had not received this error before in my strategy testing. Is this a bug, or am I doing something wrong? Should I move my DrawHorizontalLines to OnBarUpdate, and only draw on the 1st bar. An example of this DrawHorizontalLines would be Pivot lines. They are only drawn once, and at the beginning, so Initalize makes good sense to me?
What are your thoughts?
Thanks,
Brian
Comment