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 jxs_xrj, 01-12-2020, 09:49 AM
        5 responses
        3,289 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        5 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        8 responses
        61 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        5 views
        0 likes
        Last Post Option Whisperer  
        Started by halgo_boulder, 04-20-2024, 08:44 AM
        2 responses
        24 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X