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 Kirk Thorns, Today, 05:34 PM
        0 responses
        1 view
        0 likes
        Last Post Kirk Thorns  
        Started by JobDjassem, Today, 05:24 PM
        0 responses
        3 views
        0 likes
        Last Post JobDjassem  
        Started by Kirk Thorns, Today, 05:06 PM
        0 responses
        7 views
        0 likes
        Last Post Kirk Thorns  
        Started by CyberNate, Today, 03:11 PM
        5 responses
        25 views
        0 likes
        Last Post CyberNate  
        Started by NinjaTrader_ChrisL, Today, 03:44 PM
        0 responses
        4 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X