Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing time[0] for incoming Ticks - no seconds information

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

    Accessing time[0] for incoming Ticks - no seconds information

    Hello,

    I'm trying to implement an indictor that looks for price fluctuation within the last 15 seconds before each 5minute bar closes.

    In order to implement I need time[0] to return me seconds information for each incoming tick (on OnBarUpdate() method). However, time[0] only returns seconds information for historical data but not realtime data when running in market replay mode.

    Can time[0] return seconds information for real time data (i.e. incoming data) aswell?

    If not, can someone please shed some light on how something similar could be achieved?

    Regards,

    Satnam.

    #2
    Hi satnam,

    Time[0] always includes seconds but a 5 minute bar won't work for what you're looking for. The time stamp represents when the bar will end, and so will always be at predictable 5 minute intervals, and there's no time granularity within each bar.

    You could use your computer clock with DateTime.Now, or add a secondary 1-second series and read the time stamp from that series.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Excellant. Thanks.. Really impressed with NT's rapid response time on this forum..

      Comment


        #4
        You're welcome, satnam. Thanks for the kinds words and please let us know if we can assist further.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        579 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X