Okay so I have created the most simplified version of a trading algorithm I could to ask this question. So what this code is doing is buying when the 5sma crosses the 20sma,