Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple instruments & event firing order

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

    Multiple instruments & event firing order

    Hi all,
    Correct - all of the Minimum Bars required for each series needs to be satisfied for OnBarUpdate to run your backtest. In the case where historical data is missing for one instrument, you will not see it run until the historical data is available for all.

    #2
    Hello tuanhuy, and thank you for your question.

    all of the Minimum Bars required for each series needs to be satisfied for OnBarUpdate to run your backtest
    This is the responsibility of the programmer to check. The strategy will run even if these are not satisfied. However, trades placed before the bars required to trade have passed will be rejected, disabling the strategy, and referencing BarsAgo indexes before there is data to satisfy them will result in runtime log messages that disable your strategy as well.

    In the case where historical data is missing for one instrument, you will not see it run until the historical data is available for all.
    OnBarUpdate will process for the instruments you do have historical data for. You as a programmer can run a check to see that every member of CurrentBars has at least one bar available if you would like what you said to be true. This check looks like

    Code:
    foreach(int i in CurrentBars)
    {
        if (i < 1)
        {
            return;
        }
    }
    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    51 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    142 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    160 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    96 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    275 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X