So I'm new to python and started coding my first algo. It is going pretty well, but i tried to make an algo that simply bought when the stock price went over the opening price subtracted by .02, and sold once the stock price went lower than or equal to the opening price subtracted by .02. I thought that it would reduce my losses, but instead it had crazy negative returns.
Please tell me what I did wrong, and how to fix my prob or even if I can fix it
Thanks