Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Timestamps and Daily Bars

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

    Timestamps and Daily Bars

    I am debugging a strategy based on daily bars.

    At the close of my OnBarUpdate () section, I have the code:

    Code:
    [FONT=Courier New][COLOR=black][COLOR=black][FONT=Courier New]Print([/FONT][/COLOR][COLOR=maroon][FONT=Courier New]"Time[0] "[/FONT][/COLOR][COLOR=black][FONT=Courier New] + Time[[/FONT][/COLOR][COLOR=purple][FONT=Courier New]0[/FONT][/COLOR][COLOR=black][FONT=Courier New]]);[/FONT][/COLOR][/COLOR][/FONT]
    I expect the above expression to output the time corresponding to the close of the bar which just updated, triggering OnBarUpdate().

    Is this correct?

    If this is correct, then I am confused; in my output window, I see the following output corresponding with the 28/09/2010 daily bar:

    Time[0] 28/09/2010 0:00:00

    I can be certain that the above refers to the 28/09/2010 bar, as I am also outputting other data (including OHLC data), and so can see easily which bar is being referenced.

    But “0:00:00” seems to refer to the beginning of the 28/09/2010 bar (and not to the end).


    This is not as I expected given the NT documentation about timestamps, i.e.

    Bar Time Stamp
    NinjaTrader stamps a bar with the closing time of the bar. For example, a minute bar with a time of 9:31:00 AM has data from 9:30:00 AM through 9:30:59 AM.

    What have I misunderstood?

    Thanks.

    #2
    AnotherTrader, with which NT version are you working currently?

    Thanks
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by ninjatrader_bertrand View Post
      anothertrader, with which nt version are you working currently?

      Thanks
      v 6.5.1000.18

      Comment


        #4
        Unfortunately expected for 6.5, for NT7 the time component of daily data would report more consistently.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by briansaul, Today, 05:31 AM
        0 responses
        1 view
        0 likes
        Last Post briansaul  
        Started by fwendolynlpxz, Today, 05:19 AM
        0 responses
        4 views
        0 likes
        Last Post fwendolynlpxz  
        Started by traderqz, Yesterday, 12:06 AM
        11 responses
        28 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by PaulMohn, Today, 03:49 AM
        0 responses
        8 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jason  
        Working...
        X