Make sure you have enough bars in the data series you are accessing