stuck on array out of range error. Please critic my indicator loop. - page 2

 

This is the code on line 252?

 

static datetime breakoutTrapNoticeFlag, candleNotifyFlag = Time[0];

 Which is one of the first lines inside the onCalculate function.

 

something wrong with calling the Time array like that?? 

 
dazamate:

This is the code on line 252?

 

 Which is one of the first lines inside the onCalculate function.

 

something wrong with calling the Time array like that?? 

I removed candleNotifyFlag = Time[0]; and the error subsided. I don't understand why though. I wasn't even using the variable anymore.

Reason: