Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Milliseconds on market replay?

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

    Milliseconds on market replay?

    I'm running a strategy in market replay, and I'd like to record the time an event occurs down to the millsecond. Is that possible? I tried the following code below, neither works. The millisecond part is being printed as 000. According to NT7 guide here, market replay is played back at 1 second granularity, but by any chance is the actual timestamp (to the millisecond) preserved and accessible somehow?


    Code:
    Print(Bars.MarketData.Connection.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));
    Code:
    		protected override void OnMarketData(MarketDataEventArgs e)
    		{
    			Print(e.Time.ToString("yyyy-MM-dd HH:mm:ss.fff"));
    		}

    #2
    Hello,

    Thank you for the question.

    In NinjaTrader, the current smallest granularity would be either 1 tick or 1 second for time series. As you can see from your test the market data is at this granularity as well, unfortunately there is no supported way to achieve this in NinjaTrader currently.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, Yesterday, 11:51 AM
    0 responses
    18 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, Yesterday, 11:48 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    27 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    21 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X