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.
      Kate W.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by frankthearm, Today, 09:08 AM
      5 responses
      14 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      43 views
      0 likes
      Last Post jeronymite  
      Started by yertle, Today, 08:38 AM
      5 responses
      16 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by adeelshahzad, Today, 03:54 AM
      3 responses
      19 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by bill2023, Yesterday, 08:51 AM
      6 responses
      27 views
      0 likes
      Last Post NinjaTrader_Erick  
      Working...
      X