I'm trying to do a python program that tests a trading strategy as this article describes:
https://www.quantitativo.com/p/a-different-indicator?open=false#§the-david-varadi-oscillator
The program I built (with the help of chatGPT) is attached. The problem I'm having is that the output is different every time I run it, even though I selected a limited time frame so market movement shouldn't be a problem.