I have a Daily Heiken-Ashi chart open.
I have added the native data series with AddDataSeries (ie plain old Daily bars).in my Indicator's State.Configure, and I see that data just fine.
So... BarsArray[0] is daily Heiken-Ashi, BarsArray[1] is just daily, on the same symbol.
I am getting occasional Object Ref error.s on this expression...BarsArray[1].GetOpen(bar_number), where bar_number is CurrentBar.
Debugging in VS, I see this on the exception breakpoint:
BarsArray[0].Count is 650
BarsArray[1].Count is 647
So calling BarsArray[1].GetOpen(bar_number) craps out and throws the exception... well, yeah, but...
Why the 3 bar/3 day difference?
FYI:
- my chart's bar series does NOT have Break at EOD set, if that is relevant.
- this occurs on a bar that is a Tuesday in my timezone...August 3rd 2021... and
- just now occurred on a different chart on bar for Wednesday August 4th. (Hard to see how even a weekend could be involved on a Wednesday bar...even allowing for Australia being one day ahead of US. Just like the Olympic Gold medal count ;-) )
T.
Comment