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 burtoninlondon, Today, 12:38 AM
    0 responses
    5 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    13 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,983 views
    3 likes
    Last Post jhudas88  
    Working...
    X