I’ve solved the problem, but just in interest of all NT users and yourselves I thought I best post here.
I’ve just been working with GetDayBar. It had been returning null exceptions.
It was returning null exceptions. I’m running a multi-timeframe strategy with a focus on 60min charts with a secondary focus (i.e. Add(PeriodType.Minute, 1) of 1 min. GetDayBar was returning null when I was using it to track dates (i.e. currentDate = Bars.GetDayBar(1).Time). This would continue to return null object exceptions. However, when I added a third timeframe (i.e. Add(PeriodType.Day, 1)) the strategy ran fine and returned expected results.
Are we required to have a “Day” timeframe for GetDayBar to operate correctly? Is that expected behaviour?
Thanks and regards,
drolles
Comment