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 gentlebenthebear, Today, 01:30 AM
    0 responses
    2 views
    0 likes
    Last Post gentlebenthebear  
    Started by samish18, Yesterday, 08:31 AM
    2 responses
    9 views
    0 likes
    Last Post elirion
    by elirion
     
    Started by Mestor, 03-10-2023, 01:50 AM
    16 responses
    389 views
    0 likes
    Last Post z.franck  
    Started by rtwave, 04-12-2024, 09:30 AM
    4 responses
    31 views
    0 likes
    Last Post rtwave
    by rtwave
     
    Started by yertle, Yesterday, 08:38 AM
    7 responses
    30 views
    0 likes
    Last Post yertle
    by yertle
     
    Working...
    X