Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 swestendorf, Today, 11:14 AM
        2 responses
        5 views
        0 likes
        Last Post NinjaTrader_Kimberly  
        Started by xiinteractive, 04-09-2024, 08:08 AM
        4 responses
        12 views
        0 likes
        Last Post xiinteractive  
        Started by Mupulen, Today, 11:26 AM
        0 responses
        1 view
        0 likes
        Last Post Mupulen
        by Mupulen
         
        Started by Sparkyboy, Today, 10:57 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by TheMarlin801, 10-13-2020, 01:40 AM
        21 responses
        3,917 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X