Trying to backtest a simple breakout strategy from Following the Trend (Clenow):

Received a runtime error:

Is this an error in my algorithm? I have pieced it together / modified the Bitcoin and Moving Average tutorials to get the overall structure. Not sure where to dig deeper to find the source; would appreciate some input.