'Problem with making transaction in the backorder package in Python

I am trying to implement backtrader to evaluate my trading strategy, but there isn't made any trades.

The error that I get is IndexError: single positional indexer is out-of-bounds, but I get it from the transaction vector that are empty, but my problem that is that I don't know where the mistake is. I have tried to debug the code unsuccessfully. It would be really appreciated if anyone maybe has input to where the code is wrong

I have uploaded the data and my jupyternotebook on a drive here:



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source