• 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

Time[0] doesn't change until new bar

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

    Time[0] doesn't change until new bar

    I thought in NT7 that in the OnBarUpdate routine, if you have CalculateOnBarClose = false that Time[0] would always be the DateTime of the current tick. Instead, I am get the time of the bar open for every tick when using Time[0].

    How do you get the time for each tick in NT8? Or is this a bug?

    Thanks!
    Bryan
    cassb
    NinjaTrader Ecosystem Vendor - Logical Forex

    #2
    Hello,

    Thank you for the question.

    Assuming you are using a Time based series, the Time[0] would refer to the last closed bar or building bar of the Primary series depending on the COBC setting. Although each Tick calls OnBarUpdate the Time[0] still would refer to the same bar.

    To get the individual tick times, you could either use OnMarketData to observe the MarketData, or add a 1 tick series. the Time[0] on a 1 tick series would represent the Ticks time as each tick would be considered a Bar.

    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 09-07-2016, 02:01 PM.
    JesseNinjaTrader Customer Service

    Comment


      #3
      OK thanks, Jesse. I'll use the secondary bar series.
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      Comment


        #4
        Originally posted by cassb View Post
        I thought in NT7 that in the OnBarUpdate routine, if you have CalculateOnBarClose = false that Time[0] would always be the DateTime of the current tick. Instead, I am get the time of the bar open for every tick when using Time[0].

        How do you get the time for each tick in NT8? Or is this a bug?

        Thanks!
        Bryan
        Only on bars that are NOT based on a fixed-time base.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hanstanz, Today, 04:44 AM
        0 responses
        2 views
        0 likes
        Last Post Hanstanz  
        Started by juniortut, Today, 04:38 AM
        0 responses
        1 view
        0 likes
        Last Post juniortut  
        Started by rojiinko, Today, 03:58 AM
        0 responses
        1 view
        0 likes
        Last Post rojiinko  
        Started by mreanuzlazx, Today, 01:30 AM
        0 responses
        1 view
        0 likes
        Last Post mreanuzlazx  
        Started by xinepev, Today, 12:33 AM
        0 responses
        4 views
        0 likes
        Last Post xinepev
        by xinepev
         
        Working...
        X