Also, I did another backtest and ended up getting -1000000000 percent. I am not really sure how this happens(could it be short postions) I thought that maybe leverage was responsible for this. When I set it to 1 and the percent returns went up by x100. In the backtest shown, the leverage is changing but if you set it to 1 then you will see. I want to include another backtest of the algo, but I don't know how to do that. If anyone could explain the results of the backtest to me, it would help alot.