Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

cancelling a partially filled order

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

    cancelling a partially filled order

    I was wondering if there is any code that demonstrates how to cancel a partially filled order, but keeps the remaining order existing.

    For example, I want to submit a buy-stop-limit order at a particular price for 2 futures contracts. If 1 contract gets filled and then the market moves away from my stop limit price, I want to continue the trade with my existing order, but I want to cancel the buy stop limit order for 1 more contract.

    Is there a code example to do this?

    #2
    Steven, for the highest level of control over orders please work with the IOrder objects we offer -



    Comment


      #3
      Hi Bertrand,

      I forgot to mention that I'm using NT 6.5. Is there a mechanism with 6.5 that will handle partially filled orders?

      thanks,

      Steve

      Comment


        #4
        Yes Steve, the same IOrder objects were already available in NT 6.5 - here's the suitable link from the 6.5 helpguide for you (you will need to compare the tokens in 6.5, this has been simplified in NT7 recently) -



        Comment


          #5
          Thanks Bertrand for the links. I have already gone through these, but it doesn't seem to address my concern, which is a partially filled order.

          If I call "CancelOrder" on a partially filled entry order, what will happen? Will it just cancel the remaining stop order?

          Comment


            #6
            Hello,

            Yes this would remove the unfilled portion.

            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            Comment


              #7
              great thanks!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              627 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              359 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              562 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              568 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X