• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market replay more than 4 weeks old not loading secondary dataseries

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

    Market replay more than 4 weeks old not loading secondary dataseries

    Hi,

    I am getting some odd behaviour if I run my strategy on market replay when using downloaded data that is more than 4 weeks older than today's date.

    I have multiple data series within the strategy: primary is 1minute, but also have 5mins, daily etc, to calculate various indicators within the strategy.

    The strategy works fine if I run on market replay for any recent date up to about 4 weeks ago. But if I run it on an historical date further back than that, then no longer is it able to load the secondary data series - eg daily data is not available to the strategy.
    I have tried forcing it to wait until it is in realtime mode (on replay) as I read on the forums that replay can cause some issues when dealing with historical data '(Historical)' vs realtime (replay) data.
    But that makes no difference. It simply does not have access to the data ...
    I get the error in my output that

    'CurrentBars[3] = 0'

    when my daily data load:
    Add(PeriodType.Day, 1);

    is the 3rd secondary dataseries (BarsInProgress = 3).

    Is this known behaviour that market replay will not load historical data for secondary dataseries if running on data that is older than about 4/5 weeks old? many thanks

    #2
    Hello Pourleau,

    Thanks for the note.

    By default the Market Replay will use historical data to backfill from the historical database from your local PC only. Could you verify that that you have Daily historical data for the dates that you are having trouble with?

    Also, when working with a multi-time frame series are you synchronizing with data series object to ensure that your calculation will be accurate?
    http://www.ninjatrader.com/support/f...ead.php?t=3572

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks, JC.

      Re synching the timeseries, yes I did follow Josh's sample script in order to sync them with a data series within the same BarsArray, thanks.

      Re historical data,I always ensure that I have a chart open for each timeframe required by my strategy.
      So I will have a 5min chart, daily chart etc going back several months further (in the daily case) than the day I am trying to run the strategy on.
      Is that sufficient to have the data available on a chart in order to make it available to the strategy?

      thanks

      Comment


        #4
        Hello Pourleau,

        Depending on who your data provider is it should, yes. You can see what your data provider supports on the following link.
        http://www.ninjatrader.com/support/h...rical_data.htm

        Alternatively, you can check the Historical Data Manager to see what data you have by going to Tools -> Historical Data Manager -> Edit tab and then press the "+" next to the instrument to see the types of data and press the "+" next to the type of data and so forth. Attached is an image as an example.
        http://www.ninjatrader.com/support/h...ta_manager.htm

        Let me know if the problem persists.
        Attached Files
        JCNinjaTrader Customer Service

        Comment


          #5
          Thanks, JC. I was not aware of the historical data manager - that is a nice tool.

          I do have historical data in there, however. It shows I have daily data all the way back to Nov11, and 1min data from April12.
          The problem of the strategy not picking up daily data ( in BarsArray[3] ) starts to occur if I go back to end of June, or about 4-5 weeks prior to the current date.

          Given that this seems to be a problem with daily data, and having seen that daily and 1min data are stored separately by the historical data manager, I wonder if there are certain conditions or rules for accessing daily data beyond a certain historical point in time?

          thanks

          Comment


            #6
            Originally posted by Pourleau View Post
            Thanks, JC. I was not aware of the historical data manager - that is a nice tool.

            I do have historical data in there, however. It shows I have daily data all the way back to Nov11, and 1min data from April12.
            The problem of the strategy not picking up daily data ( in BarsArray[3] ) starts to occur if I go back to end of June, or about 4-5 weeks prior to the current date.

            Given that this seems to be a problem with daily data, and having seen that daily and 1min data are stored separately by the historical data manager, I wonder if there are certain conditions or rules for accessing daily data beyond a certain historical point in time?

            thanks

            Can you post some sample code that at a bare minimum that shows this condition ?

            Take out whatever you have that is private to you.

            I can check it out over on my machine and test it in my market replay.

            Comment


              #7
              Hello Pourleau,

              Alternatively, you can send a toy* NinjaScript code replicating the behavior to Support[At]NinjaTrader[Dot]com so that I may be of further assistance.

              Happy to be of further assistance.

              *Toy - basically a stripped down version of code that isn't necessarily the whole logic. Making it easier to identify lines of code.
              JCNinjaTrader Customer Service

              Comment


                #8
                Sledge / JC

                Many thanks - I have sent a cut-down version of code highlighting this issue to the ninja support mail address.

                Any guidance as to why this might occur is very much appreciated.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by chnh1, Yesterday, 11:51 PM
                0 responses
                7 views
                0 likes
                Last Post chnh1
                by chnh1
                 
                Started by Jasper99, Yesterday, 10:29 PM
                0 responses
                11 views
                0 likes
                Last Post Jasper99  
                Started by Jasper99, Yesterday, 09:50 PM
                0 responses
                5 views
                0 likes
                Last Post Jasper99  
                Started by StevenNelson, Yesterday, 05:57 PM
                0 responses
                7 views
                0 likes
                Last Post StevenNelson  
                Started by srbdoc, Yesterday, 03:59 PM
                1 response
                17 views
                0 likes
                Last Post NinjaTrader_EricB  
                Working...
                X