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 sofortune, Today, 10:28 AM
          3 responses
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by DawnTreader, 05-08-2024, 05:58 PM
          11 responses
          41 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by tkaboris, Today, 06:27 AM
          4 responses
          13 views
          0 likes
          Last Post tkaboris  
          Started by marcus2300, Today, 10:21 AM
          2 responses
          4 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by proptradingshop, Today, 10:07 AM
          3 responses
          5 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X