Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DateTime in Replay

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

    DateTime in Replay

    How to I get the current DateTime in Replay? In my code I refer to DateTime.Now, but this does not give me the actual time of where I am in the Replay playback.
    thanks.
    Last edited by astrolobe; 10-09-2009, 09:32 AM.

    #2
    Time[0] still returns you the DateTime timestamps of the bars. Can you use this?

    If you wanted the DateTime.Now equivalent while running a replay, you should take a look at the BarTimer indicator. Please go to the Misc section and look at the "private DateTime Now" function.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      That does not work for me, as I need to know the time when an indicator condition is met...and I am running my strategy at the tick level.

      Comment


        #4
        Please see the BarTimer indicator as suggested above.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh, that was just what I was looking for.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          61 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          148 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          98 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          286 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X