You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
bb01100100
changed the title
close_trade method
Mandatory reason needed for cancel_pending_order method
Jan 25, 2022
bb01100100
changed the title
Mandatory reason needed for cancel_pending_order method
Virtual broker requires reason arg for cancel_pending_order method
Jan 25, 2022
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)
The text was updated successfully, but these errors were encountered: