Backtrader Community

    • 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/

    Question on canceling order

    General Code/Help
    2
    4
    159
    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.
    • ZHUOER ZHANG
      ZHUOER ZHANG last edited by

      I have found that orders with [submitted] status cannot be canceled whilst it can only be canceled when it is [accepted].
      Can anyone explain the reason behind that?
      Thank you.

      1 Reply Last reply Reply Quote 0
      • ZHUOER ZHANG
        ZHUOER ZHANG last edited by

        To put it in another form, is there a certain kind of status that can be canceled whilst a certain kind can't? If so, what is the reason?
        In my view as long as the order is not completed, it can be canceled.

        1 Reply Last reply Reply Quote 0
        • A
          ab_trader last edited by

          In my view as long as the order is not completed, it can be canceled.

          Order can also be rejected (and not completed), and therefore can't be cancelled. Recommend you to read about order processing here:
          Docs - Orders - General

          • If my answer helped, hit reputation up arrow at lower right corner of the post.
          • Python Debugging With Pdb
          • New to python and bt - check this out
          ZHUOER ZHANG 1 Reply Last reply Reply Quote 1
          • ZHUOER ZHANG
            ZHUOER ZHANG @ab_trader last edited by

            @ab_trader Thank you!

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors