Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue NT 8 replay data

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

    Issue NT 8 replay data

    Hi support, I have an issue with replay (using historical tick data) in NT 8 version 8.1.3.1. Today I upgraded from NT8 version 8.0.26.1 to version 8.1.3.1 If I do a replay I found the follwing issue.

    In the OnMarketData section I use the following code to retrieve the timestamp of the last tick.

    protected override void OnMarketData(MarketDataEventArgs e)
    {
    if (e.MarketDataType == MarketDataType.Last)
    LastTickDateTime=e.Time;
    }

    In replay mode in version 8.0.26 this gives the exact timestamp of each tick, so if I do a replay of July 12, the timestamp of each tick is dated July 12and the correct time as well. If I run the same replay in version 8.1.3.1 this does not give the timestamp of the last tick, but gives the current data/time, so if I do a replay of July 12, the timestamp of each tick is not dated July 12, but dated July 15 and also the time is the current time instead of the time of the replay.

    This means my replay is not giving the same results as the backtest, this is an issue for upgrading to the latest version. How could this be solved?

    Kind regards,
    Rene Kreileman
    The Netherlands

    #2
    Hello Rene,

    I'm not able to reproduce.

    Below is a link to a video.


    Using the attached test script, are you finding the behavior is different than what is shown in the video?

    May I confirm you have more than one day of historical data loading?
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi, thnks for the reply. I have also debugged my code any further and in the OnMarketData section the lasttick time is ok but using in in the OnBarUpdate it is giving the current date. In the OnbarUpdate section I set the LastTickdateTime based on the connection, if the connection is the replay connection I use the lastTick Time from the OnmarketData section. I found out the determing the replay connection is causing the issue.

      I use:

      if (Connection.Connections.FirstOrDefault(c => c.Options.Name == "Playback Connection") != null) {


      to check if it is the playback connection. I tested both NT versions and in version 8.0.26.1 the name of the playback connection is "Playback Connection", but in version 8.1.3.1 the name of the playback connection is "Playback". For future strategies I have now included a variable with connection name to use, so that is solved.

      But I also want to upgrade my live environment running a lot of strategies. Is there any way I can temporarily change the name of the playback connection from "Playback" back to "Playbakc Connection" so that I am sure the code is functioning as before? If I look in NT under configure connection I am not able to change the display name.

      Look forward to your reply.

      Kind regards,
      Rene Kreileman
      The Netherlands

      Comment


        #4
        Hello Rene,

        To check if the connection is playback:

        if (Cbi.Connection.PlaybackConnection != null)
        {
        // connection is playback
        }

        Unfortunately, no, the Playback connection cannot be renamed.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        53 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        70 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X