• 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

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 aviat72, 04-26-2020, 09:41 PM
    10 responses
    90 views
    0 likes
    Last Post kissandfly  
    Started by healthooa, Today, 01:28 AM
    0 responses
    7 views
    0 likes
    Last Post healthooa  
    Started by superkolleech, Today, 12:46 AM
    0 responses
    9 views
    0 likes
    Last Post superkolleech  
    Started by harjinderjit, Yesterday, 08:24 PM
    0 responses
    20 views
    0 likes
    Last Post harjinderjit  
    Started by Againmain1, Yesterday, 03:04 AM
    1 response
    27 views
    1 like
    Last Post NinjaTrader_ShawnB  
    Working...
    X