Algotopian is starting. Let it be the future of backtrader. Check it out! https://www.algotopian.com
For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

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.


  • administrators

    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?


Log in to reply
 

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.