• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ChangeOrder() and Filled question

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

    ChangeOrder() and Filled question

    I would like to ask about one scenario in Unmanaged mode.
    1. Imagine we have existing partially filled order = 10 / 100 contracts are filled, so order-state is PartFilled.
    2. Now I call ChangeOrder(...) on this order with new quantity15 and same prices.


    Now, when I call order.Filled - what value I get?
    a) Filled == 10 contracts remains, because only unfilled part of the order was modified, but it is still the same order that holds its original values
    b) Filled == 0, because changing the order completely replaced the order for new one

    Which one is right a) or b) ?
    Last edited by misova; 08-26-2015, 02:20 PM.

    #2
    Hello misova,

    Thank you for your inquiry.

    order.Filled would return a value of 10 as your order has filled 10 contracts.

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your quick answer

      so if I understand it correctly, then
      Assumption 1
      IOrder.Quantity always means just "Remaining / Unfilled" quantity of the order in the NT7 API.
      Is it right?

      Assumption 2
      And if the order is in state PartFilled, then IOrder.Quantity will return only the "Remaining / Unfilled" part of the order. Is this right too?

      Assumption 3
      If I use ChangeOrder(...) in Unmanaged mode and change there quantity of the order, then I am changing only the "Remaining / Unfilled" part of the order. Is this right too?
      Last edited by misova; 08-26-2015, 03:13 PM.

      Comment


        #4
        Hello misova,

        1 & 2
        order.Quantity will return the quantity of the order that you have specified, regardless of filled/unfilled contracts.

        3
        When you are calling ChangeOrder(), the IOrder object is being changed. This would change the object's quantity to the quantity you've specified in your ChangeOrder().
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by nailz420, Today, 08:38 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by frankduc, Today, 09:00 AM
        0 responses
        6 views
        0 likes
        Last Post frankduc  
        Started by Kabua, Yesterday, 11:24 PM
        1 response
        7 views
        0 likes
        Last Post koganam
        by koganam
         
        Started by KandI, Today, 08:03 AM
        2 responses
        7 views
        0 likes
        Last Post KandI
        by KandI
         
        Started by kujista, Yesterday, 10:33 PM
        5 responses
        15 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X