I've been pretty silent on my project for the last month, waiting patiently for NT to issue an update to a few major bugs that makes it inusable with TD-Ameritrade. So far, no luck. But can't afford to wait any longer, so am getting back into it.
And immediately found myself stuck on what I consider a major bug which wasted me several days.
Basically, if you have multiple instruments added to your strategy... but the beginning historical data isn't fully available for even ONE of these instruments, then OnBarUpdate isn't called for ANY of the instruments until historical data *is* available.
In other words:
Add("AMZN", PeriodType.Minute, 5);
Add("GOOG", PeriodType.Minute, 5);
Let's say you run your strategy analyzer starting from 9/17/2008... but for whatever reason, your historical database for AMZN doesn't contain data until 9/20/2008. (I don't really know the reason; this failure happens repeatedly, invisibly to me. I have three different data feeds; even if part of the historical data isn't available, NinjaTrader doesn't go back to retrieve it as long as it has some of the data.)
Then your OnBarUpdate() will not be called for ANY symbol in your strategy until the first bar of 9/20/2008.
In my case, I had over 40 symbols running in my strategy. I had no idea why the results I was getting were so completely wacky... until I put in a brain-dead test that was only printing out Time[0]. I then realized the strategy run wasn't starting when I thought it was starting.. and several wasted days later, I realized it was starting on a much later date because *one* of the 40 symbols didn't have available historical data.

Comment