Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems placing multiple orders on IB TWS

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

    Problems placing multiple orders on IB TWS

    When this event is triggered, the orders appear in the output window. However, only the first order appears in Interative Brokers TWS. The 2nd order is ignored. We've tried this many times. We are seeing no errors despite having TraceOrders = true. We have EntriesPerDirection set to a high value. Also worthy to note: this code works perfectly in backtesting. Only _live_ is giving us these problems.

    Any ideas why multiple orders triggered on an event are not appearing in TWS?

    case states._______:
    if (buyOrder.OrderState == OrderState.Filled) {
    stake = x; // we hold this many shares
    basePrice = buyOrder.AvgFillPrice; // set base price
    state = states.TRADING;
    if (mode == modes.LONG) {
    buyOrder = EnterLongLimit(0, true, 1000, basePrice -1 "");
    sellOrder = ExitLongLimit(0, true, stake, basePrice+1, "", "");
    } else if (mode == modes.SHORT) {
    sellOrder = EnterShortLimit(0, true, 1000, "");
    buyOrder = ExitShortLimit(0, true, stake, basePrice -1, "", "");
    }
    }
    break;

    #2
    Hi damian,

    Welcome to the NinjaTrader Support Forums.

    Please check your Control Center log tab and try to track it. See if the order is even submitted. You should be able to see submissions from your TraceOrders output as well. Are you getting completely blank results here? If that is the case you will want to go back and see and check if your order should have even been submitted. Add a print function right before and after the order submissions.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks. But, nothing unusual in the log. As I mentioned earlier, the limit "Orders" do appear in ninja log output / Output window with traceorders=true, so I don't see why I'd need to put print statements in the code? Please explain what you are looking for. All of the orders, however, are not showing in IB TWS.

      Comment


        #4
        I am looking for confirmation that the order is sent out. Please post the relevant Output Window logs.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        580 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        335 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        102 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X