I am simply trying to copy all the close values to the new Vector and I keep getting an ArgumentOutOfRange exception on the Bolded call to that indexer.
What am I missing here?
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (CurrentBar < 14)
return;
try
{
yValues = Vector.Create<double>(Close.Count);
for (int closeCount = 0; closeCount < Close.Count - 1; closeCount++)
{
yValues[closeCount] = Close.IsValidDataPoint(closeCount) ? Close[closeCount] : 0;
}
}
catch (Exception ex)
{
Print("Exception - " + ex.Message);
}
}
Comment