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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        153 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        133 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        128 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X