I noticed that the virtual broker cancel_pending_order method had a mandatory reason parameter, but the Oanda broker does not have this parameter.
I think this means a strategy that wants to call self.broker.cancel_pending_order(order_id=123) would work in live trading but not in backtesting because the method signatures are different.
If the virtual_broker.py cancel_pending_order function had reason=None then this would solve the issue.
References:
autotrader/brokers/virtual/virtual_broker.py function cancel_pending_order(self, order_id, reason)
autotrader/brokers/oanda/Oanda.py function cancel_pending_order(self, order_id)
I noticed that the virtual broker
cancel_pending_order
method had a mandatoryreason
parameter, but the Oanda broker does not have this parameter.I think this means a strategy that wants to call
self.broker.cancel_pending_order(order_id=123)
would work in live trading but not in backtesting because the method signatures are different.If the virtual_broker.py
cancel_pending_order
function hadreason=None
then this would solve the issue.References:
autotrader/brokers/virtual/virtual_broker.py
functioncancel_pending_order(self, order_id, reason)
autotrader/brokers/oanda/Oanda.py
functioncancel_pending_order(self, order_id)