Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IB Error processing request:-'sb'

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

    IB Error processing request:-'sb'

    Hi,

    trading two Interactive Brokers accounts (FFA subaccounts) simultaneously from a script (same script running for both), this morning I got an error on one account immediately after a enter short limit order was sent out and script got closed (see log below).

    As there seems to be some issues between NT6.5 and TWS887.2 (at least with FFA subaccounts), I wonder what the cause of the problem was, and why such an error terminates a running strategy (while it kept running for the other account)?

    Can such errors be caught before crashing a script? If not, wouldn’t that make automated trading IB via NT impossible?

    Error log:

    3/4/2009 9:36:19 AM,Default,Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. 2109,
    3/4/2009 9:36:19 AM,Strategy,Strategy 'HoboESv05e' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself.,
    3/4/2009 9:36:19 AM,Order,Error processing request:-'sb' : cause - jextend.sb.e(sb.java:1027) (322) Affected Order: SellShort 1 Limit @ 709.25,
    3/4/2009 9:36:19 AM,Order,Order='99223f6eb86a48e2b4e5d1c98ebd6ce8/U517134' Name='HoboST' New State=Rejected Instrument='ES 03-09' Action=SellShort Limit price=709.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=OrderRejected Native error='Error processing request:-'sb' : cause - jextend.sb.e(sb.java:1027) (322)',
    3/4/2009 9:36:19 AM,Order,Order='99223f6eb86a48e2b4e5d1c98ebd6ce8/U517134' Name='HoboST' New State=Accepted Instrument='ES 03-09' Action=SellShort Limit price=709.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='',
    3/4/2009 9:36:19 AM,Order,Order='66e8273e6a2641f794434e8665631a35/U516155' Name='HoboST' New State=PendingSubmit Instrument='ES 03-09' Action=SellShort Limit price=709.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='',
    3/4/2009 9:36:19 AM,Order,Order='99223f6eb86a48e2b4e5d1c98ebd6ce8/U517134' Name='HoboST' New State=PendingSubmit Instrument='ES 03-09' Action=SellShort Limit price=709.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='',

    Thank you for your support!

    hlh

    P.S.: To avoid the usual recommendations: Yes, I do have the current recommended versions of NT, TWS, .NET, and yes I have reinstalled them several times as requested by NT support (without it ever helping at all).

    #2
    Hi hlh, welcome to our forums - this error comes directly from IB so I would suggest contacting them on this error number 322.

    An error will terminate the script, at least with per default enabled RealtimeErrorHandling - http://www.ninjatrader-support.com/H...rHandling.html

    You could set this to TakeNoAction in the Initialize(), but you would then need to organize a user defined rejection handling in your code.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,

      thank you for your reply.

      Error 322 from Interactive Brokers is caused by an API call. As the API is NinjaTrader, I guess that leads back to you to tell me what API call it might have been causing that error.

      Thank you!

      P.S.: To avoid the usual recommendations: Yes, I do have the current recommended versions of NT, TWS, .NET, and yes I have reinstalled them several times as requested by NT support (without it ever helping at all).

      Comment


        #4
        Since you followed our recommendations: please double you are trading the ES instrument which comes with the NT installation and not a custom added instrument. In addition, please perform Tools->Options->Misc->Reset Instruments again.

        Comment


          #5
          Dierk,

          thank you for your reply.

          As this is a new installation of NT, I just kept using the ES settings coming with NT. And, as the instrument settings obiously worked for the second account, and btw worked on both accounts for the last couple of days, I would not assume that there should be an instrument setting error. Anyway, I will reset the instruments when the markets are closed.

          But as it seems, and I guess this is why you ask me to reset the instruments, IBs TWS would report the error code 322 in case something with the ticker ID or whatsoever is wrong (I am not a programer and have no clue about this, but that's what I found on Google). So this leads me to the assumption that for a certain reason NT was sending something to confuse TWS, or TWS was not correctly interpreting something sent to it.

          Either way, as this was not a "logical" error from a script or a manual mistake, it would be important to know the reason for that communication error between NT and TWS to avoid future problems for the user and to fix the bug or define a reliable workaround.

          Comment


            #6
            Since ES traded fine on some accounts, there likely is no setup issue nor an issue on "mis-communication" as orders are sent to TWS.

            What accounts are the ones which did work and what account is the one where it didn't work?

            Guessing, may be the one where it didn't work was not meant to trading. Could you please any trade at all there, or is the issue just with the ES?

            Comment


              #7
              Dierk,

              these are my two regular live trading subaccounts at IB!

              I am trading both from an identical script, each activated (opened) on an individual 5min ES chart. So each account gets the same signals at the same time.

              As you can see in the log, both limit entry orders were sent out at 9:36:19, one got filled, and the other caused the crash! This did not happen the days before, and did not happen today since I reactivated the script again for the account where it crahsed.

              Comment


                #8
                Since this was an issue which happened yesterday and no longer does happen it makes most sense to clarify with IB support on why they rejected the order yesterday. Would be great if you kept us posted.

                Comment


                  #9
                  Very disappointing attitude!

                  This is how you deal with a problem caused by your frontend to a supported brokers trading platform?

                  Wrong assumptions first, blaming everything else and not for a moment considering an issue with your software? And then, when all the obvioulsy wrong assumptions do not apply, you send your customer somewhere else to get rid of a problem you should be responsible for to solve or at least dig into when the level 1 standard answers fail to address the problem?

                  Quite obviously was NT sending something to IB which got rejected. So this is a 99% issue caused by NT, and a 1% issue that IB or the CME could not handle a single limit order for one ES contract?

                  Comment


                    #10
                    Let me try to clarify: we are not blaming anyone. Apparently this is a situation where an order is rejected on a non-reoccuring base: it works in general but did not in a particular situation.

                    The best way to resolve the issue is to contact the broker and clarify why this particular order was rejected. Please let us know what your broker comes back with.

                    Thanks

                    Comment


                      #11
                      Now that is interesting!

                      I checked IBs audit (log) file: The erroneous order never made it to IBs TWS, or at least not as an order which was processed and then rejected. It just received (and logged) one order for one account (PlaceOrder, Achnowledged, Filled) but never that for the second one - no record about it at all. After I reactivated the Ninja script for the second account, IBs log shows always correctly order logs for both accounts.

                      So the leads to the clue, that NT on itself produced an error which was interpreted or at least reported/shown as this rejection, or maybe more likely (what do I know), NT was sending something "completly wrong" to TWS which simply got rejected as it was not a correct order (at all) as it was supposed to be?!

                      Comment


                        #12
                        Please send me your log and traces files as well the TWS log file to "support AT ninjatrader DOT com" subject "for Dierk" and reference this thread so I could send it to IB support to clarify why TWS rejects your order.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by algospoke, Yesterday, 06:40 PM
                        2 responses
                        19 views
                        0 likes
                        Last Post algospoke  
                        Started by ghoul, Today, 06:02 PM
                        3 responses
                        14 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Started by jeronymite, 04-12-2024, 04:26 PM
                        3 responses
                        45 views
                        0 likes
                        Last Post jeronymite  
                        Started by Barry Milan, Yesterday, 10:35 PM
                        7 responses
                        20 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Started by AttiM, 02-14-2024, 05:20 PM
                        10 responses
                        181 views
                        0 likes
                        Last Post jeronymite  
                        Working...
                        X