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

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 knighty6508, Today, 01:20 AM
          0 responses
          1 view
          0 likes
          Last Post knighty6508  
          Started by knighty6508, Today, 01:17 AM
          0 responses
          0 views
          0 likes
          Last Post knighty6508  
          Started by tierraany, Today, 01:06 AM
          0 responses
          2 views
          0 likes
          Last Post tierraany  
          Started by Wilmarobyi, Today, 12:48 AM
          0 responses
          3 views
          0 likes
          Last Post Wilmarobyi  
          Started by BackToTheFutures, 08-17-2021, 03:15 PM
          8 responses
          732 views
          0 likes
          Last Post joehanus  
          Working...
          X