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

An exit order placed. . . has been ignored

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

    #16
    Originally posted by henry.omd View Post
    1. Regardless of whether OnOrderUpdate() is in sync with the bars series object, at the time OnOrderUpdate() is called, you are nevertheless in some kind of bar or tick, right? All I am asking is that the reported time is wrong with regard to the latest bar. My assertion is that even if I had run the backtest against 1990 data (if one were available), the Time[0] in OnOrderUpdate() would report today 2007--in some cases--you can see from the printout that you get the timestamp right in some cases. This appears like a bug, wouldn't you agree?
    Incorrect. Time[0] follows exact same logic as e.g. Close[0], meaning you would get the timestamp (or close value) of the bar being processing which is (a) backtest: the historical bar being processed and (b) live: the "rightmost" bar.

    Comment


      #17
      Thanks Dierk, let me see if I understand you correctly:
      In backtest then, if I were testing with data from 2006/1/1 to 2006/12/31, I should never expect to see 2007/12/31 for Time[0] in OnOrderUpdate().

      Did I understand you correctly?

      Comment


        #18
        Dierk is off for rest of the day but from my understanding, that is correct.
        RayNinjaTrader Customer Service

        Comment


          #19
          Thanks Ray, with the following output, I now fully understand what Dierk meant:

          5/24/2006 12:00:00 AM Entered internal PlaceOrder() method at 5/24/2006 12:00:00 AM: Action=Buy OrderType=Limit Quantity=1 LimitPrice=1.2717 StopPrice=0 SignalName='' FromEntrySignal=''
          20070101: Order='NT-00000/Back101' Name='Buy' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1.2717 Stop price=0 Quantity=1 Strategy='RSITRAD' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='e3278a1193b94d8fac2d8077efedb889' Gtd='12/1/2099 12:00:00 AM'
          20070101: Order='NT-00000/Back101' Name='Buy' State=Accepted Instrument='$EURUSD'

          My guess as to what is going on is that in historical backtest, the Time[0] in OnOrderUpdate() is still the right most bar. In this test, the data set is 2006. So I guess it thinks the "rightmost" data set is 2007/1/1, as you see in the output.

          I at least understand that this is consistent with the live case, and maybe can even imagine that this is preferred by the developers. On the other hand, I found this confusing, because I expected--perhaps mistakenly--that Time[0] in OnOrderUpdate() would reflect the simulated order fill time in NT. I am guilty of expecting NT simulation to feel as close to the real thing as possible.

          At any rate, now I understand, and will move on. Thanks for your help.
          -Henry

          Comment


            #20
            This is a bug where basically Open[0], Close[0]...Time[0] does not work as expected in the new OnOrderStatus/OnExecution etc. methods. This bug will be fixed with next 6.5 update. Thanks for reporting.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bortz, 11-06-2023, 08:04 AM
            47 responses
            1,611 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            9 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            19 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            6 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            22 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X