As a general tip:
Use the record function for variables that are important to track, in this case it would be your trading indicators.
The algo now records the indicators as the backtest processes. It shows open to close (O2C) and close to close (C2C) in bps. It is great for tracking long/short positions, leverage, trading indicators, etc...
I also added a few print statements that show your variables in the log.
When I'm building an algo and I want to follow it as it steps through, I do the build over a short time span, a couple of weeks, and print the variables to the log, to make sure it is doing what I thought. It's a simple way to watch what is happening, if you don't know how to use the debugging functionality.
As for the strategy:
There are very few days when from close to open the price falls more than 10bps, so you're algo only traded a couple of times over the 13 years.
If you adjust to any day it is down from close to open, it trades a bit more frequently, but still not much. Even the article shows that it trades on about 8% of trading days. Then holding a long position for one day and exiting at close doesn't result in much activity/return.
It is a simple counter trend strategy, good for learning how to build an algo, not so good for actual trading (in my opinion).
Hope these couple of little tips help you make progress.
Best