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 kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    89 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    92 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    70 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    87 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    64 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X