kernc / backtesting.py

:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
https://kernc.github.io/backtesting.py/
GNU Affero General Public License v3.0
5.06k stars 990 forks source link

Cant find open positions #1066

Closed MrPotatoHead-Dev closed 9 months ago

MrPotatoHead-Dev commented 9 months ago

Tried: if self.position == False: if len(self.trades) == 0:

yet when I run the code it still enters trades when it shouldnt. Ps i narrowed the scope of the data down massively so it should enter only twice but instead its entering 7 times