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

IOrder.Quantity meaning and behaviour

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

    IOrder.Quantity meaning and behaviour

    I made some research about behavior of IOrder.Quantity
    when performing changes on the order by calling ChangeOrder(..).
    Everything was tested for Unmanaged mode.

    I found that:
    A:
    IOrder.Quantity could be seen like "MaxFillableQuantity" - meaning is it is the max value, where position of the order can grow.

    When calling ChangeOrder(...) there are 2 possible scenarios:
    B1:
    If (parameter Quantity > Filled) -> sets new maximum position that order can reach
    B2
    If (parameter Quantity <= Filled) -> this makes order immediately OrderState.Filled, which is final state and no more changes are possible on such order. It behaves similarly to cancellation of the order.

    What I found new and interesting:
    Very interesting is, that we can sucessfully change Quantity of the existing order to value 0 (or any other value < Filled). In case we see IOrder.Quantity as "MaxFillableQuantity", this is acceptable and makes some sense. But it is really not very intuitive.

    Can you please confirm each one A, B1, B2 they are fully correct or not?
    Last edited by misova; 08-27-2015, 03:33 PM.

    #2
    Hello misova,

    Thank you for your post.

    A) This is correct, the quantity of the order is the maximum total quantity that can fill.

    B) Also correct, changing the quantity of the order will increase the maximum total quantity that can fill.

    B2) Also correct, changing the quantity to less than the current filled amount will cause the orderState of the order to become instantly filled. Any further change attempts will result in an overfill.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DanielTynera, Today, 01:14 AM
    0 responses
    2 views
    0 likes
    Last Post DanielTynera  
    Started by yertle, 04-18-2024, 08:38 AM
    9 responses
    40 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by techgetgame, Yesterday, 11:42 PM
    0 responses
    10 views
    0 likes
    Last Post techgetgame  
    Started by sephichapdson, Yesterday, 11:36 PM
    0 responses
    2 views
    0 likes
    Last Post sephichapdson  
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,615 views
    0 likes
    Last Post aligator  
    Working...
    X