Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi instruments strategy orders not filled at same time

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

    Multi instruments strategy orders not filled at same time

    BIP 0 MSFT 10min
    BIP 1 AAPL 10min

    if (BarsInProgress == 1)
    {
    EnterLong(1,100,"Buy AAPL");
    EnterLong(0, 100, "BUY MSFT"); }
    Are they supposed to enter at same time? In my test result MSFT order is filled one bar behind AAPL? What's wrong?

    #2
    Hi Stephen, this behavior is because the MSFT order is triggered on the secondary bar series, but the order is sent and filled on the primary bar series.

    If you'd like better accuracy while backtesting, please see this reference sample about Backtesting NinjaScript Strategies with an Intrabar Granularity.

    The comments inside the sample contain detailed information about multiple instrument bars.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Hello
      I am still having the same problem, I have to wait until BIP1 to get the latest price for the second instrument, how can I enter 2 postions at same time?

      Comment


        #4
        Stephen, this is expected as you have to wait one OnBarUpdate() to process the entry on the next BIP, either use the link Austin provided to achieve a more granular entry or just submit each in it's own BarsInProgess context.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X