Hi, I'm new to QC and have some basic questions. I coded a simple strategy that aims to buy when a SMA crosses over the price and sell the other way, I played with the optimizer and the code with SPY, it wasn't a great strategy but seemed to work fine. After that I just changed to AAPL and the results are horrible, I even tried optimizing but it didn't work either. I just want to confirm if it is a horrible strategy or if something is wrong with the code. Thanks! I leave both examples below.

Also, I tried to make tolerance a parameter and optimize it but just got errors when optimizing. Any Ideas?