Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IOrder filled problem on Simulated Data Feed

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

    IOrder filled problem on Simulated Data Feed

    Hello.
    I found out that the same entry order in simulate data feed sometimes get filled status sometimes only working status but in both cases it has been shown in Control Center >> Orders as filled.
    It make mess in my strategy, I'm testing now.
    Why this situation happened and how to solve this problem??
    The following code give me in same situation sometimes true sometimes false.
    [CODE]if(((longStartNQ != null && longStartNQ.OrderState == OrderState.Filled)&&(shortStartES != null
    && shortStartES.OrderState == OrderState.Filled)) ||
    ((shortStartNQ != null && shortStartNQ.OrderState == OrderState.Filled)&&(longStartES != null
    && longStartES.OrderState == OrderState.Filled)))

    {executionControl = true;}
    else
    {executionControl = false;}/CODE]
    Rgds Czarek

    #2
    Czarek,

    Would need more information about how to reproduce to be able to evaluate. Please try using TraceOrders = true to see if that provides you feedback too. Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hello.
      I already did it. I place 2 orders on the same time on different instruments, and I see in the Output window that sometimes one of them ( not always the same one) has no filled status. The last status is working status. Sometimes both have filled status. Both of orders have same conditions and same codes. Orders are entered and exited many times during strategy work and sometimes has filled status sometimes only working status. This happened during simulate data connection. Czarek

      Comment


        #4
        You would need to debug with prints in OnOrderUpdate() to see what may be going on. Being in a Working state is a perfectly valid state for an order. If the simulated data doesn't fill your order then that is why you are in Working. The market conditions were not right.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Josh.
          Please tell me:
          Do the condition for enter the order have to valid from order entry until filled status?
          I mean for e.g
          if (ToTime(Time[0]) == 100000)
          entryOrder = EnterLong();

          At 10 o'clock order get status pending. This this order stay not filled after 10 o'clock or get Accepted, Working and Filles status even though is past 10 o'clock ???
          Czarek

          Comment


            #6
            No the condition has to be valid for the order to placed, it does not have to remain valid for it to execute. In your case you place a market order which would execute quickly after the entry condition became true (depending on liquidiy), if you for example place limit orders and have set them to 'not expire' those could be filled at 15:00 eventhough you placed them at 10:00.

            Comment


              #7
              In this case I can not find any reason why sometimes the order status remain Working sometimes remain ,and is shown in Control Center as filled?
              Is it kind of software bug? Maybe you can suggest me any possible reason?
              Code is:
              longStartNQ = EnterLong (positionsizeNQ, "NQLongStart")
              Czarek

              Comment


                #8
                We will need reproducible scenarios and more information to be able to evaluate.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Czarek, I would suggest you compare the printed order status from your strategy with timestamps to the one shown in the Control Center.

                  Comment


                    #10
                    Bertrand.
                    Both time stamp are the same
                    Here is the output window:
                    Code:
                    6/8/2009 11:20:00 Entered internal PlaceOrder() method at 6/8/2009 11:20:00: Action=Buy OrderType=Market Quantity=3 LimitPrice=0 StopPrice=0 SignalName='NQLongStart' FromEntrySignal=''
                    Order='a9f3bf83ce2944a48be2452b14183e10/Sim101' Name='ESShortStart' State=PendingSubmit Instrument='ES 09-09' Action=SellShort Limit price=0 Stop price=0 Quantity=2' Type=Market Tif=Gtc Oco='' Filled=0 Fill price=0 Token='a9f3bf83ce2944a48be2452b14183e10' Gtd='1/1/0001 0:00:00'
                    Order='1e5c2ed56ebd447988f60732c112aa35/Sim101' Name='NQLongStart' State=PendingSubmit Instrument='NQ 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=3' Type=Market Tif=Gtc Oco='' Filled=0 Fill price=0 Token='1e5c2ed56ebd447988f60732c112aa35' Gtd='1/1/0001 0:00:00'
                    Order='a9f3bf83ce2944a48be2452b14183e10/Sim101' Name='ESShortStart' State=Accepted Instrument='ES 09-09' Action=SellShort Limit price=0 Stop price=0 Quantity=2' Type=Market Tif=Gtc Oco='' Filled=0 Fill price=0 Token='a9f3bf83ce2944a48be2452b14183e10' Gtd='1/1/0001 0:00:00'
                    Order='a9f3bf83ce2944a48be2452b14183e10/Sim101' Name='ESShortStart' State=Working Instrument='ES 09-09' Action=SellShort Limit price=0 Stop price=0 Quantity=2' Type=Market Tif=Gtc Oco='' Filled=0 Fill price=0 Token='a9f3bf83ce2944a48be2452b14183e10' Gtd='1/1/0001 0:00:00'
                    Czarek

                    Comment


                      #11
                      Czarek, and as those orders were placed, did you see a different state in the Control Center / Orders section? The market order would reach a very short working state between submission and fill....

                      Comment


                        #12
                        Bertrand.
                        Yes, I see it but very guickly because it is Symulate Data connection.
                        Czarek

                        Comment


                          #13
                          Look in your log tab directly. What state does it say the order is. If it says it is filled then the order is filled. If it says its working and no subsequent events then it is in a working state.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #14
                            Josh.
                            I'm not sure I understand you clearly.
                            I attache log of last 2 orders placed simultaneously.
                            Order named NQLongStart - remai with Working status in output window
                            Order named ESShortStart- got Filled status.
                            Czarek

                            Code:
                            6/8/2009 14:00:08|1|4|Simulation account 'Sim101' reset
                            6/8/2009 14:00:36|1|128|Starting NinjaScript strategy 'NQESArbitrazDayRozjazd/e1091218e92f4f48a451af0fde85bad7' : On starting a real-time strategy - StrategySync=SubmitLive EntryHandling=UniqueEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=TakeNoAction ExitOnClose=True/ triggering 30 before close Set order quantity by=Strategy
                            6/8/2009 14:03:12|1|32|Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1/Sim101' Name='NQLongStart' New State=PendingSubmit Instrument='NQ 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|32|Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1/Sim101' Name='NQLongStart' New State=Accepted Instrument='NQ 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|32|Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1/Sim101' Name='NQLongStart' New State=Working Instrument='NQ 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|32|Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1/Sim101' Name='NQLongStart' New State=PartFilled Instrument='NQ 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=1 Fill price=1383.75 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|16|Execution='977d60f4f0b845e3ab99ad943d8fc08b' Instrument='NQ 09-09' Account='Sim101' Exchange=Default Price=1383.75 Quantity=1 Market position=Long Operation=Insert Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1' Time='6/8/2009 14:03:13'
                            6/8/2009 14:03:13|1|64|Instrument='NQ 09-09' Account='Sim101' Avg price=1383.75 Quantity=1 Market position=Long Operation=Insert Currency=Unknown
                            6/8/2009 14:03:13|1|32|Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1/Sim101' Name='NQLongStart' New State=PartFilled Instrument='NQ 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=2 Fill price=1383.75 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|16|Execution='00b2a40d40824a888ecdb236e2a8fb19' Instrument='NQ 09-09' Account='Sim101' Exchange=Default Price=1383.75 Quantity=1 Market position=Long Operation=Insert Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1' Time='6/8/2009 14:03:13'
                            6/8/2009 14:03:13|1|64|Instrument='NQ 09-09' Account='Sim101' Avg price=1383.75 Quantity=2 Market position=Long Operation=Update Currency=Unknown
                            6/8/2009 14:03:13|1|32|Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1/Sim101' Name='NQLongStart' New State=Filled Instrument='NQ 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=3 Type=Market Filled=3 Fill price=1383.75 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|16|Execution='c66941876cdb40d89d081f70a04cdddb' Instrument='NQ 09-09' Account='Sim101' Exchange=Default Price=1383.75 Quantity=1 Market position=Long Operation=Insert Order='2cbf903929ec4fcc9a1c5cdbdf60c6e1' Time='6/8/2009 14:03:13'
                            6/8/2009 14:03:13|1|64|Instrument='NQ 09-09' Account='Sim101' Avg price=1383.75 Quantity=3 Market position=Long Operation=Update Currency=Unknown
                            6/8/2009 14:03:13|1|32|Order='1bf20d44587c41d18b638f45d44b4895/Sim101' Name='ESShortStart' New State=PendingSubmit Instrument='ES 09-09' Action=SellShort Limit price=0 Stop price=0 Quantity=2 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|32|Order='1bf20d44587c41d18b638f45d44b4895/Sim101' Name='ESShortStart' New State=Accepted Instrument='ES 09-09' Action=SellShort Limit price=0 Stop price=0 Quantity=2 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|32|Order='1bf20d44587c41d18b638f45d44b4895/Sim101' Name='ESShortStart' New State=Working Instrument='ES 09-09' Action=SellShort Limit price=0 Stop price=0 Quantity=2 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|32|Order='1bf20d44587c41d18b638f45d44b4895/Sim101' Name='ESShortStart' New State=PartFilled Instrument='ES 09-09' Action=SellShort Limit price=0 Stop price=0 Quantity=2 Type=Market Filled=1 Fill price=813.25 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|16|Execution='6b6c4a1a3add44ecaa72c508840104b1' Instrument='ES 09-09' Account='Sim101' Exchange=Default Price=813.25 Quantity=1 Market position=Short Operation=Insert Order='1bf20d44587c41d18b638f45d44b4895' Time='6/8/2009 14:03:13'
                            6/8/2009 14:03:13|1|64|Instrument='ES 09-09' Account='Sim101' Avg price=813.25 Quantity=1 Market position=Short Operation=Insert Currency=Unknown
                            6/8/2009 14:03:13|1|32|Order='1bf20d44587c41d18b638f45d44b4895/Sim101' Name='ESShortStart' New State=Filled Instrument='ES 09-09' Action=SellShort Limit price=0 Stop price=0 Quantity=2 Type=Market Filled=2 Fill price=813.25 Error=NoError Native error=''
                            6/8/2009 14:03:13|1|16|Execution='57a3705ef1284c828968647d38a5f0ac' Instrument='ES 09-09' Account='Sim101' Exchange=Default Price=813.25 Quantity=1 Market position=Short Operation=Insert Order='1bf20d44587c41d18b638f45d44b4895' Time='6/8/2009 14:03:13'
                            6/8/2009 14:03:13|1|64|Instrument='ES 09-09' Account='Sim101' Avg price=813.25 Quantity=2 Market position=Short Operation=Update Currency=Unknown

                            Comment


                              #15
                              If in the logs it says it is filled then it is filled. You could have likely cleared out the IOrder object for it too early and stopped receiving OnOrderUpdate() events.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              648 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              369 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              109 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              573 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              575 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X