Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Cancel order accepted

    General Code/Help
    2
    2
    372
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gctrader last edited by

      I have the strategy checked and cancel orders with self.broker.cancel () in backtesting mode but live connected to Interactive cancellations are not executed. I have not found a statement in the documentation

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        @gctrader said in Cancel order accepted:

        I have not found a statement in the documentation

        I don't know what you are expecting or what your actual problem is, given the lack of code, logs or anything else.

        You can check that cancelling orders work with the ibtest.py sample which is in the sources. Run it with with these flags for example: --broker --trade --cancel --exectype Limit

        This will use IB as a broker, enabling sending orders and use a Limit order to avoid immediate execution, which will allow to cancel it.

        You will of course need additional flags to chose timeframe, resampling, ticker, port, host and may be client id. But it is your system. you will have to figure those out yourself.

        It may also be wise to run things with the paper trading account or with the demo.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
        $(document).ready(function () { app.coldLoad(); }); }