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, 05-11-2026, 05:56 AM
        0 responses
        28 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        183 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        337 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        261 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X