I've been working on converting this indicator to python for a few days now:
This is what I got so far:
I have a feeling that I made some mistakes.
It kinda works(the result is similar(sometimes) to what you can see on tradingview), but there is a number of problems:
The output signal depends highly on starting time(i.e. 4h interval signals will be totally different if backtest starts at 12-00 or 12-45). I guess it's because of the way candles for a tick are created? But then why this is not the issue for other indicators?
I would be very grateful if someone could finish/redo cause I'm not sure what I'm doing wrong