Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is anybody running automated trading strategies successfully with IB using TWS?

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

    Is anybody running automated trading strategies successfully with IB using TWS?

    Hi

    I've been testing a fully automated trading strategy using by IB TWS papertrade account and I've hit a host of unexpected issues.

    I'm starting to wonder if it is actually possible to create a reliable automated trading system using NT and TWS, despite having been a pro software developer in a previous career.

    Is anybody using automated NT strategies with IB successfully?

    These are some of my issues:

    1) A bug in TWS that initiates an "unable to match order state to execution" error message, discussed here. NT seems to lose track of orders placed with TWS, clearly of concern when trading live.

    For some strange reason, I get double trade visualisation lines connecting trade entries and exits on the charts, when this error message occurs, although there are only single entries received by TWS (luckily).

    2)Testing for, tracking and closing partially filled profit target orders submitted by ExitLongLimit using iOrders. Partial fills leave a position partially open which can be very damaging, unless managed properly.

    So far I have been unable to find a reliable way of managing partially filled target orders. I know it is possible, just can't figure out how.

    So I would be delighted to hear from anybody who is overcoming these hurdles and is reliably running live trading with an NT and IB/TWS system.

    Thanks, in advance

    Chris

    #2
    1) Dierk will either post or contact you privately with a custom build that we hope will address this issue. We have tweaked some code to surpress duplicate order state events that we receive via the IB API --> This is the source of the issue

    2) Will get back to you on this one.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks very much, Ray, for the quick reply and for looking into these issues.

      It will be very interesting to hear from other NT users who are (hopefully) using automated trading effectively with IB.

      Chris

      Comment


        #4
        On item #2, it might take us a while to get back to you on this. We have been workiing through some advanced test models to find a manner which is does not leave any gaps...this is when using the advanced exposed event driven method such as OnOrderUpdate() and OnExecution() etc...
        RayNinjaTrader Customer Service

        Comment


          #5
          Hi Ray

          I know that you must be incredibly busy, but is there an ETA for the custom build?

          Thanks

          Chris

          Comment


            #6
            Hello,


            Not at this time. It will be offered as soon as possible.
            DenNinjaTrader Customer Service

            Comment


              #7
              Is there any news about these two issues yet please?

              Thanks
              Chris

              Comment


                #8
                Hi Chris,

                I will need some additional information on the type of strategy you are running in terms of partial fills.

                Are you running a strategy with:
                1. single entry order with multiple contracts?
                2. multiple entry orders with single contracts each?
                3. multiple entry orders with multiple contracts each?
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Hi Josh

                  I was trading a single stock (RIMM) using just a single order. Other stocks experience the same problem.

                  The order entry code was based on your reference sampleonorderupdate script, which uses ExitLongLimit.

                  Thanks

                  Chris

                  Comment


                    #10
                    So single entry multiple shares. Chris I will get back to you.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Josh

                      Yes, it was RIMM with a lot size of 250 shares entered as a single order.

                      Chris

                      Comment


                        #12
                        Hi Chris,

                        Unfortunately there is still a TWS bug that our latest custom build cannot address at this time with any workarounds.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Hi Josh

                          OK thanks for looking into this.

                          Does this just affect stocks or is the bug universal for all instruments?

                          Is there a chance of a workaround for a new version of the custom build, as mentioned by Ray in the message above?

                          It seems that NT just cannot be used for automated trading with TWS until IB fix the bug. Are NT chasing IB for a fix?

                          Thanks

                          Chris

                          Comment


                            #14
                            Chris,

                            The issue is an universal issue with TWS. Unfortunately we have explored all possible workarounds and they will not suffice. We have contacted IB to get this fixed.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              We have contacted IB to get this fixed.
                              Josh, could you please tell me what the exact issue is with the TWS API so that I can also contact IB so that we are hitting them from two directions.

                              Maybe other NT/IB users can also file a ticket with IB about this too, to add more force to getting the problem fixed.

                              Thanks
                              Chris

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              558 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              324 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              101 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              545 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              547 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X