bracket_order expiration date question?
Is it possible to set a bracket_order that will expire only if the parent order was not executed within the expiration date? If the parent order was executed within the expiration date then the expire date will be ignored.
From my experiments that valid expiration date will cancel the order regardless.
No. It's a different order. Its activation is linked to the execution of the parent, but the details are independent.
Ok thanks, to solve this I am now storing all of my order instances in a dictionary and, monitoring every next() increment. I check the date through order.created and if it hasnt entered a trade by a certain timeframe I cancel it and if it does I leave it open.
Do you think using order.created is a good approach?