Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnBarUpdate is not fired in Multi Instrument Backtest.

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

    #31
    Thanks again, though performance is not the issue here as the strategy is not computationally intensive.

    In my code, I "initialize" symbols (by means of setting a boolean in a list of a custom class) once they have enough CurrentBars for any calculations. Any symbols must be "initialized" before calculations can be performed or the symbol can be considered for trading. This ensures that there are no index out of bounds errors.

    The real issue here is this:
    Originally posted by NinjaTrader_PatrickH View Post
    Any call to a contract that there is no data for will cause this behavior. Please remove or comment out any future contracts that the data feed provider would not have data for.
    I have loaded a list of current Russell 1000 stocks.
    I want to backtest my strategy from 2000-2015.
    I can't backtest my strategy since NT won't start calling OnBarUpdate() until all the instruments have data, despite my efforts of coding ways to avoid index out of bounds errors.

    In order to backtest:
    I now have to remove all stocks which have IPO'd between 2000-2015.
    I also have to remove new symbols which were created as spin-offs.
    When doing this for a universe of 1000 symbols, doing this manually is difficult as you can imagine.
    Lets say I want to try this out on mid/small caps and now take another 1000 of the Russell 2000 instead. I have to search for IPOs and spin-offs again.

    OR

    Go into Historical Data Manager > Edit > Expand Each Symbol > Expand Day then look manually for stocks which do not have data 2000-2015. This is probably worse.

    So, is there a better way to deal with this - or a way to at least flag/list the symbols which data is not available for? Also, you mentioned that NT8 will offer performance enhancements. However, performance enhancements are the least of my problems when I am not even able to backtest due to these issues.

    Comment


      #32
      Hello wuileng,

      Thank you for your response.

      There would not be a workaround for this. There is not a way to check the historical data to verify the symbol has the data needed before loading it.

      Comment


        #33
        Alright, thanks again.

        Any idea if such a feature will be included in NT8 (besides performance enhancements)? If not, could you please add this to the list of suggestions for your development team?

        Comment


          #34
          Hello wuileng,

          Thank you for your response.

          Nothing I am aware of at this time, but I will forward your suggestion along.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          633 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          364 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          567 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X