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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          68 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          37 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          62 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          62 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          53 views
          0 likes
          Last Post CarlTrading  
          Working...
          X