What is the purpose of stopargs in bracket_order?
I've noticed that submitting bracket orders w/just "valid" parameter seems to get ignored:
valid= datetime.now() + datetime.timedelta(minutes=15)
Oanda ignores this and puts their default expiry (1 month).
In the bracket_order example
os = self.buy_bracket( price=p1, valid=valid1, stopprice=p2, stopargs=dict(valid=valid2), limitprice=p3, limitargs=dict(valid=valid3),)
What is the purpose of limitargs & stopargs? In the example above.. is it to set the expiration date of entry/exit price, stop loss, and take profit? If that's teh case, I'm confused how that works.. can someone explain in human term how this works and why anyone would do this?
That works if the broker supports expiration of orders with different valid timestamps.
limitorders don't really exist in Oanda as children of the main order, but just as price inputs. As such both orders are simulated and
valid3play no role.
This is mentioned in the support for bracket orders in the Docs - Live - Oanda