For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Update / Amend Existing Orders

  • Hi,

    Is it possible to update / amend existing open orders? Many platforms in real life are capable of this, wondering if it's possible in backtrader?

    EG. I have open Stop-loss / Take-Profit orders, but I am adjusting my current long position (say increasing by 10%)... so I need to update the open Stop-Loss / Take-profit sizes and execution prices to match the new adjusted long position. Is this possible??

    At present I am just:

    1. Cancelling existing SL/TP
    2. Wait until next day so the notify order process is finished and the SL/TP orders are gone
    3. Create new buy to adjust position, and create new SL/TP

    This work fine... but you miss out on full 24 hours every time (using daily data), thus reducing profitability significantly. So it would be great if there was an update/amend functionality!

    I would also be interested if you have any other suggestions to mange this!

    Thank you,

  • administrators

    At the moment it's not possible. Was already spoken in another thread and noted for when it may be possible.

  • Thanks @backtrader, understood. Would you have any tips for managing, or is my current approach the best for now?

    Also, are there any plans to implement such functionality? If so do you have a 'ball park' time frame?

    Thank you!!

  • administrators

    @cwse you can speed up notifications. See the last posts in this thread Community -Replaying Data - Effects on Signal Generators

    At the moment development is somehow frozen, although some bits (including order modification) may actually be enough to kickstart a new feature release.

  • awesome! Fingers crossed for a new release :-)

  • any update on when amend would be available in backtrader.

  • administrators

    There is none at the moment.