• 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

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 James108, Today, 06:09 PM
    0 responses
    1 view
    0 likes
    Last Post James108  
    Started by RandanAL, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post RandanAL  
    Started by timko, Today, 05:06 PM
    0 responses
    5 views
    0 likes
    Last Post timko
    by timko
     
    Started by ballboy11, Today, 01:04 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by Linda1507, Today, 01:22 PM
    2 responses
    15 views
    0 likes
    Last Post Linda1507  
    Working...
    X