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

Canceling order still in the submitted queue

  • Hello,

    If an order is still in the submitted queue of the backbroker and the strategy tries to cancel it. The order will not be canceled because the broker only checked the pending queue. Is this a bug ?

  • administrators

    You send a Market order to a real broker and then try to cancel it ... let me know the results.

  • 2017-11-10T12:00:00, BUY CREATE, 1325.00, status:1 ref 16543 type 3
    2017-11-10T12:00:00, SELL CREATE 1325.00, status:1 ref 16544 size -1 type 3
    2017-11-10T12:00:00, SELL CREATE 1325.00, status:1 ref 16545 size -1 type 2

    The order being sent is a bracket order with the main order type a buy stop order. From my understanding, this should be allowed to be canceled immediately.

    If cancel method also checks the submitted queue for order cancellation, is this an acceptable solution?

  • administrators

    A Stop order has no guaranteed execution price, which renders the bracket useless.

    Note: There is actually no guarantee that even a Limit order will be executed at the requested limit price, because it can be executed at a better price (yes, it happens in real life, even if obviously in rare occasions)

Log in to reply