Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Do not change status of a Filled order

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Do not change status of a Filled order

    I have one instance of a buy/sell order being sent to the market followed by a cancel order. The returned status for the order is given as rejected becuase the original order was filled. This is confusing because the real state of the order is filled. Although one can distinguish this by calling NTFilled(orderId) <> 0 it is not ideal.


    Thanks,

    Moscu

    #2
    Moscu,

    If you try to cancel an order and it was already filled it will return rejected. This is the new state of your order based on your latest actions. You can use the workaround you already know of to address this.

    I will forward your suggestion to development.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh:

      I hope you listened to me. If an order is Filled no matter how many times I try to cancel it the "Real" status is filled. The response to my request you can return something different that 0 in the return value of the cancel request if you already know is being filled. This is the same with the change command. Except in the latest it properly returns an error that says "You can not change a filled order". If at the moment of the cancel request NT still pending for the broker request then the DLL should return 0 and next time a check the status it should still return Filled because that is the correct status.

      Moscu

      Comment


        #4
        moscu,

        Development has been informed of this thread.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi moscu,

          After speaking with development there are situations in which this can be the case as we receive the information from your brokerage API. Unfortunately right now you will need to code around it. We have this on our list for the future.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            I am glad to hear it will be fixed in future releases.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            85 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            47 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            29 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            32 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            67 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X