Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IOrder filled problem on Simulated Data Feed

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

    #16
    Josh.
    My main problem is that
    I want to make sure that both orders simultaneously placed already pending on stock and will be filled for sure.
    I tried to make it like this:
    Code:
    if(((longStartNQ != null && longStartNQ.OrderState == OrderState.Filled)&&(shortStartES != null 
    				&& shortStartES.OrderState == OrderState.Filled))
     {executionControl = true;}				      
    				   else
     {executionControl = false;}
    I tried also check by token
    Code:
    longStartES != null && longStartES.Token == order.Token
    but does not work.

    Can you give me different idea how to check if this 2 orders are at least Pending??

    Czarek

    Comment


      #17
      Czarek,

      You can't check token together because you only have one token per event, not two. Just check for the first order, if its past pending submit, set a temp variable to true. Check the second order separately, if its past pending submit, set another temp variable to true. When both temp variables are true then you know both are past pending submit.
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        Sure.Thanks a lot.
        Rgds
        Wesley

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kinfxhk, 07-14-2026, 09:39 AM
        0 responses
        127 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        105 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        85 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        105 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        86 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X