Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Playback of MarketReplay slow: downloads and plays 3 days historical data

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

    Playback of MarketReplay slow: downloads and plays 3 days historical data

    While developing an indicator, I am using the Playback connection and MarketReplay data.

    I notice that MarketReplay is slow to start up because of (at least) two things it is doing:

    a) Though I start the replay at 03 May 2022, since I do not have replay data for the 3 days prior to 03 May, NT will
    go and download 3 days of historical data (not replay .nrd but tick Last.ncd files) over the network; and

    b) then NT will replay all the indicators on the chart, using State == State.Historical, for those three days, prior to
    allowing the Playback controls to be manipulated. During these several minutes, the Playback control is grayed out and frozen.

    I suppose this makes for a nice "history" display. However, it makes the user interface unresponsive for a large amount of time,
    and it is doing alot of extra work that I did not request, and do not need done.

    Question: is there any way to turn off the extra work that (a) and (b) involve, and just let me start adjusting the Playback controls
    immediately? It is rarely starting at the right point in time anyway, so NT seems to do alot of work for nothing.

    Thank you.
    Last edited by yodaler; 05-26-2022, 04:16 PM.

    #2
    Two new observations, to speed up playback of MarketReplay data:

    a) I downloaded the prior several days MarketReplay data, so that going to the network is not needed.

    b) I think the 3 days history retrieve was controlled by the DataSeries on my chart. When I reduce it from 5 to 1 (the other 2 days were weekend days), then the history replay period is only 1 day.
    This speeds up the State.Historical phase of indicator loading.

    Other suggestions still welcome.

    Thank you.

    Comment


      #3
      Hello yodaler,

      Thank you for your note.

      While connected to the Playback connection, NinjaTrader cannot connect to any data servers and is not able to download any historical data. If no historical data is available locally for an instrument, I would not expect to see any historical data loaded for a chart.

      If there is available data locally, this will be loaded to the chart in accordance to the number of days requested in the Days to Load parameter.

      You can tell a script to only calculate when real time data is available by putting the following at the beginning of OnBarUpdate:

      if (State == State.Historical)
      return;

      This would keep the indicator or strategy from calculating over historical data.

      Commenting out or removing any drawing tools used in a script can also improve playback speed.

      Please let us know if we may be of further assistance to you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      52 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
      43 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      48 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X