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

playback time resolution

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

    playback time resolution

    Hello,

    How can I get playback stamp time in Milliseconds resolution?

    Sincerely ,Kobi

    #2
    Hello levikNT,

    Thanks for the note.

    You can get the Milliseconds of the DateTime object like so:

    Code:
    Times[0][0].Millisecond;
    Please let us know if we may be of any further assistance.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      Thank you for your response,

      I am logging my strategy to a log file using the playback time for log time stamp

      I am using it as follow

      DateTime logTime = Cbi.Connection.PlaybackConnection.Now;
      logTime.ToString("dd-MM-yyyy HH:mm:ss.fff")

      but the time stamp that I get from the playback is in second resolution and not in Millisec as I exepted .

      Why??

      I would not like to use the Time series for loging message!

      In Simulation mode I take the pc time
      DateTime logTime = DateTime.Now
      logTime.ToString("dd-MM-yyyy HH:mm:ss.fff")

      and it works OK

      Sincerely,Kobi

      Comment


        #4
        Hello levikNT,

        Thanks for the reply.

        This behavior is likely because the Playback connection is only updated every second for performance reasons. Unfortunately, the only supported way of getting the millisecond data is to use the Time series.

        Please let me know if I may be of any further assistance.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        11 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        1 view
        0 likes
        Last Post port119
        by port119
         
        Started by Philippe56140, Today, 02:35 PM
        0 responses
        3 views
        0 likes
        Last Post Philippe56140  
        Started by 00nevest, Today, 02:27 PM
        0 responses
        2 views
        0 likes
        Last Post 00nevest  
        Started by Jonafare, 12-06-2012, 03:48 PM
        5 responses
        3,987 views
        0 likes
        Last Post rene69851  
        Working...
        X