Thank you for writing in.
The reason why IsValidDataPoint() returned true is because a Bars object exists for Closes[idx].
I would suggest this check instead:
if (Closes[idx].Count > 0) Print(Closes[idx][0]); // alternative if (CurrentBars[idx] > -1) Print(Closes[idx][0]);
This would prevent the print from occurring if no bars exist for the series you are trying to access.
Please, let us know if we may be of further assistance.
Leave a comment: