backtesting.py icon indicating copy to clipboard operation
backtesting.py copied to clipboard

AssertionError

Open dpblnt opened this issue 1 year ago • 2 comments

Expected Behavior

order get canceled

Actual Behavior

(<Order size=-4.0, contingent=1>, <Order size=-4.0, stop=22768.95979, contingent=1>)
    for order in self.orders: order.cancel()
  File "/usr/local/lib/python3.8/dist-packages/backtesting/backtesting.py", line 420, in cancel
    assert False
AssertionError

Steps to Reproduce


			if(len(self.orders)>0):
				print(self.orders)
			for order in self.orders: order.cancel()

Additional info

  • Backtesting version: 0.3.3
  • bokeh.__version__:
  • OS:

dpblnt avatar Jun 16 '23 09:06 dpblnt

Can you show some code (MWE) that I can run to reproduce the issue?

kernc avatar Jun 16 '23 12:06 kernc

I am also facing this issue in version 0.3.3, I cannot cancel any orders.

Which older version can I use for now to test the "cancel order" functionality?

AhmadSherief avatar Aug 12 '23 08:08 AhmadSherief