Backtesting CHART SCREEN FREEZES


I would like to execute the following code

FOR CANDLES 3,2,1

BBT(CLOSE,14,2,SIMPLE)-BBB(CLOSE,14,2,SIMPLE)

AVERAGE OF THE DIFFERENCE

AND COMPARE IT WITH THE 0TH CANDLE'S BBT-BBB DIFFERENCE

I KEEP GETTING NO TRADE ERRORS OR THE BACKTESTING CHART SCREEN FREEZES

adding, SUBTRACTING, AVERAGING 2 VECTORS (VALUES OF 2 CANDLES WORKS FINE) WHEN I CONSIDER 3RD CANDLE, EVERYTHING MESSES UP. SCREEN FREEZES AS IN THE PICTURE ABOVE.

It takes little time while backtest and it depends on how much historical data you are trying to backtest, if the condition does not matchs it throw error. Please check the same code with some other scripts and verify if it is working or post exact code/condition which you are using.