protected override void Initialize() { CalculateOnBarClose = true; MaximumBarsLookBack = MaximumBarsLookBack.Infinite ; Add("$EURUSD",PeriodType.Second, 1,MarketDataType.Bid) ; // 1 sec } ... Print ("Highs[1].Count = "+Highs[1].Count); Print ("Highs[1].BarsSinceSession = "+Highs[1].BarsSinceSession); Print ("Highs[1][Count-10] = "+Highs[1][Highs[1].Count-10]);
Highs[1].Count = 5432
Highs[1].BarsSinceSession= 158
... and gets an error at that point:
I assume (it seems incorrectly) that if a data series has a bar count of 5432 and one attempts to access bar # 5422 (i.e Count-10), it should not be a problem ... but it seems the maximum bar one can access is determined by BarsSinceSession, since if one loops from bar # 0 backwards, there is no problem until one reaches bar # BarsSinceSession+1, at which point the error occurs.
Advice most appreciated. Thanks!
Comment