Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

onposition - check orders

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

    onposition - check orders

    Hello,

    I have issues in onexecution with counting variables (in fast moving markets).

    So I try to check the orders in onposition but I get an error message because of "execution" with

    if(exitOrder1c != null && exitOrder1c == execution.Order&& execution.Order.OrderState == OrderState.Filled)

    and an error message because of "order" with

    if (exitOrder1c != null && exitOrder1c == order&& order.OrderState == OrderState.Filled)

    How can one do in onPosition to check if an order is filled.

    Thank you.
    Tony

    #2
    Hi Tonynt,

    Thank you for your post.

    OnPositionUpdate() will use the IPosition for the method.
    http://www.ninjatrader.com/support/h...?iposition.htm

    You can try checking when you get long or short or when a certain number of contracts are either long or short to help determine when the order was filled.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    6 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X