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

  • NinjaTrader_ZacharyG
    replied
    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().

    Leave a comment:


  • misova
    replied
    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.

    Leave a comment:


  • NinjaTrader_ZacharyG
    replied
    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.

    Leave a comment:


  • misova
    started a topic ChangeOrder() and Filled question

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by bortz, 11-06-2023, 08:04 AM
47 responses
1,610 views
0 likes
Last Post aligator  
Started by jaybedreamin, Today, 05:56 PM
0 responses
9 views
0 likes
Last Post jaybedreamin  
Started by DJ888, 04-16-2024, 06:09 PM
6 responses
19 views
0 likes
Last Post DJ888
by DJ888
 
Started by Jon17, Today, 04:33 PM
0 responses
6 views
0 likes
Last Post Jon17
by Jon17
 
Started by Javierw.ok, Today, 04:12 PM
0 responses
16 views
0 likes
Last Post Javierw.ok  
Working...
X