Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 helpwanted, Today, 03:06 AM
        1 response
        7 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        385 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X