Announcement

Collapse
No announcement yet.

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.

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        66 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X