Implementation of the strategy from Pine Script 4 (TradingView) in python

Job ID: 34965261

Budget: $30 – $250 USD

I will clarify that I have already transferred the strategy, using numpy and pandas for data and the vectorbt framework for backtesting modeling. The problem is that the results of the Strategy Tester in TradingView and in my script are radically different, based on the same data. As I understand it, the problem is the difference between the execution model of pine script and Python. The task is to debug the python script. As a result, I need approximately the same backtesting data. Please tell me the price for the completed task. I have attached the script in question.
Related categories: Python Pine Script