Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 acceessing time stamp when using calculation methid On Each Tick

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

    NT8 acceessing time stamp when using calculation methid On Each Tick

    What is the best way to get the current timestamp when I have Calculate On each Tick selected. ie the exact time when that tick is processed, as we don't have a bar index to access it, or do we?

    #2
    Hello,

    Thank you for the question.

    For this, if you are only using 1 series, you could use OnMarketData to get the current ticks time stamps, Time[0] would refer to the Current bar which may or may not be a 1 tick series so that would not be accurate in this case when referring to only the current tick.

    Otherwise you could also Add a 1 tick series and then get the Time[0] from the secondary series which would be the time of each tick.

    I look forward to being of further assistance.

    Comment


      #3
      Originally posted by GKonheiser View Post
      What is the best way to get the current timestamp when I have Calculate On each Tick selected. ie the exact time when that tick is processed, as we don't have a bar index to access it, or do we?
      Time[0] is it.

      Edit: This is only true if you are not using a time-delimited series. i.e., using Range bars, tick bars, renko or some such. I apologize. I am usually watching range bars, so had a brain poop on this one.
      Last edited by koganam; 11-25-2015, 12:55 PM.

      Comment


        #4
        So if mit primary bars are 10min bars but I have calculate on it tick set in ninja trader 8 there is no way of accessing the time stamp when it calculates without adding the tick time series ?

        Comment


          #5
          Hello,

          I would suggest trying this question and Printing the time stamp, The print I received for a 10 minute series on each tick is:

          protected override void OnBarUpdate()
          {
          Print(Time[0]);
          }

          11/25/2015 11:10:00 AM
          11/25/2015 11:10:00 AM
          11/25/2015 11:10:00 AM
          11/25/2015 11:10:00 AM
          11/25/2015 11:10:00 AM
          11/25/2015 11:10:00 AM

          or with milisecond:

          protected override void OnBarUpdate()
          {
          Print(Time[0].ToString("MM/dd/yyyy hh:mm:ss.fff tt"));
          }


          11/25/2015 11:10:00.000 AM
          11/25/2015 11:10:00.000 AM
          11/25/2015 11:10:00.000 AM
          11/25/2015 11:10:00.000 AM
          11/25/2015 11:10:00.000 AM

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 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
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X