Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 algospoke, Yesterday, 06:40 PM
        2 responses
        19 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        45 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        20 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        180 views
        0 likes
        Last Post jeronymite  
        Working...
        X