I get a argument out of range exception in my code and don't know why.
I have a 1 min chart, which works fine.
I also added 5 min Bars in the initial method of the indicator.
Add(PeriodType.Minute, 5);
In the onbarupdate Method following code throws a exception, but only on the fifth time or so it gets called:
if (Lows[1].Count < 30)
return;
int lowestValue5m = LowestBar(Lows[1], 30);
The LowestBar thing is the cause of the exception. But i don't know why. Lows[1] has over 6000 bars at this time.
thx for help!
Comment