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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        162 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        313 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        350 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X