• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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.
    DierkNinjaTrader Customer Service

    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.
            DierkNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bouncetherubble, Yesterday, 08:42 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by bortz, Yesterday, 08:18 AM
            5 responses
            35 views
            0 likes
            Last Post bortz
            by bortz
             
            Started by GARZONJ, Yesterday, 09:02 PM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by siroya, Today, 06:32 AM
            4 responses
            19 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by cstern71, 09-02-2019, 10:30 AM
            2 responses
            40 views
            0 likes
            Last Post tgn55
            by tgn55
             
            Working...
            X