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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        57 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X