Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical data in a multi-instrument strategy

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

    Historical data in a multi-instrument strategy

    Hi,

    I am building a multi-instrument strategy that will process day bars. For various reasons, it needs about 60 to 100 bars of history to find signals.

    I believe in a single instrument strategy it will automatically go back and process historical data on startegy startup, thereby calculating what positions should already be "open".


    My question is, in a multi-instrument scenario, when i add the bars in my code is it automatically going to pull and process the historical data for each and every instrument? If this isnt going to happen automatically, is there a programmatic way to achieve this?

    Thanks!

    #2
    bridenour,

    It will go back and grab data up till your starting date you set in the Format Data Series window when you run a strategy. If your data provider does not have data all the way back there for all bar series your strategy will effectively start at the earliest point in time when all bar series have data.

    This is done automatically and there is no way for you to manually invoke a data call.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok,

      I think this works for me, but i'd like to make doubly sure, if you don't mind.

      My strategy uses two bar time frames, daily and minute. The daily bars are used to generate order entry signals, and i require 60 days worth of history.

      The minute bars are used to manage stops and exits, and i require no history for these bars.

      My strategy will have up to 1000 instruments. Based on what you are saying, when i start my strategy up it will go get the daily history, because that is available, but will not get the minute history, because that is not available.

      With the above happening, my strategy should begin executing immediately, i would assume? I am hoping it is not going to wait until it gets 60 days worth of minute bar history (which i dont even need).

      thanks

      Comment


        #4
        Processing of the strategy will not occur till all bar objects have data. If you have 60 days of daily data it will "ignore" it in terms of running the strategy until you have minute data. You should still be able to access those 60 days of historical daily data for validation purposes though.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          My question is, will it wait until i have 60 days of minute data? Or just a single bar of minute data? I dont need any back data for the minute bars for the logic.

          I guess im a little confused as to how and when a strategy thinks it needs historical data or not. I realize the start time setting will tell it how much historical data to get, but im not sure when/if the strategy simply wont process without that data being present.

          thanks

          Comment


            #6
            It depends how you have coded it. It will wait till ALL bar objects have data and what you have on your BarsRequired parameter.

            It doesn't think if it needs historical data or not. It will always try to load data for the time frame you select. If it can't get data it will not process the strategy till all bar series have data.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Ok, so if i set bars required = 60, then it will wait till it has 60 day bars and 60 minute bars. The 60 day bars can be gotten from historical data, and the 60 minute bars will accumulate over an hour or so. Seems like that should work then...

              Comment


                #8
                Right. If your data provider does have historical minute data, this 60 bar requirement for minute bars can be filled with historical minute bars too.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                558 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                324 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                545 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                547 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X