• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pending Submit Issue NT7

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

    Pending Submit Issue NT7

    I have an automated strategy that places 2 orders, one in the direction of the trade and a second one identical to the first only with a take profit. The system will place the 2 orders successfully but then hangs up on the Limit (take profit) order. Not sure how to diagnose this issue. I have attached a screenshot and the log file.

    Thanks for your help!
    Attached Files
    Last edited by NinjaTrader_PatrickG; 09-17-2018, 08:27 AM.

    #2
    I removed the log file from your message as the log/trace files can contain sensitive information.

    I see that you're using the latest version of NinjaTrader 7, however, I want to be sure that you've reset your instruments as well to make sure your database is up to date.
    • Disconnect from your data feed: NinjaTrader Control Center> File> Disconnect> Select your data feed.
    • Reset your Instruments: NinjaTrader Control Center> Tools> Options> Data tab> Reset Instruments>OK.
    • Restart NinjaTrader> Connect (NinjaTrader Control Center> File> Connect> Select your connection.

    I suspect that you're reusing the same OCO ID for your orders, however, I cannot confirm this without the trace file. If you'd like for me to verify this, please send your files to me via the platform:
    • You can do this by going to the Control Center-> Help-> Mail to Platform Support
    • Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.
    • Please reference the following ticket number in the body of the email: 1972759 ATTN PatrickG and also include a link to this forum post

    Do you submit these orders with an OCO ID that you define?
    Patrick G.NinjaTrader Customer Service

    Comment


      #3
      The files are on their way to you.
      Thanks,
      Chuck

      Comment


        #4
        Would using the same OCO ID be a good thing or a bad thing? I can ask to have that changed if you think that will fix the issue.
        Thanks,
        Chuck

        Comment


          #5
          I responded via email. If you haven't received an email, check your junk/spam folders for messages from PlatformSupport[AT]NinjaTrader[DOT]com.

          Reusing the same OCO ID over and over again can cause orders to become stuck in pending submit, just as you have reported here.

          A new OCO ID should be generated/used every time you wish to submit a new OCO group to avoid this.
          Patrick G.NinjaTrader Customer Service

          Comment


            #6
            I just sent an inquiry in to get that information for you. I have not submitted OCO orders before so I doubt there are any other orders using the same OCO ID.

            Does that cause you to look in a different place for the right direction or should we wait for the reply?
            Thanks,
            Chuck

            Comment


              #7
              Please clarify - did you receive my email reply? I sent it to cp******[email protected] about 2 hours ago. I'd like to move this conversation to email if possible because I have your files in that ticket (1972842).

              I do not see other use of this OCO ID in your files when I search for it, however, this is the only difference compared to your other orders. I would recommend asking the developer of your strategy about the proper way to implement OCO into your order submission.
              Patrick G.NinjaTrader Customer Service

              Comment


                #8
                I do have the email, but it says in there that I wont receive any more emails without revisiting the thread, so here I am again.

                In looking more specifically at the data, do you think the issue is caused by the order ID being alphanumeric on that order? Would that cause an issue with TD Ameritrade?
                Thanks!

                Comment


                  #9
                  I did not send you a message which references returning to this thread at all. I suspect you're looking at an older email from us. Here is the message I sent to you via email. It was sent at 11:55AM Eastern US time today. Please look for messages from PlatformSupport[AT}NinjaTrader[DOT]com in your junk/spam folders:
                  Hello Chuck,

                  Thanks for writing in.

                  I see that this order has an OCO ID of '2828566281436402032':

                  2018-09-17 09:36:05:965 (TD Ameritrade) Tda.Adapter.Submit1: OCO order queued: Order='d9d26d9b5ff44c46b4d9b14e47b9926d/********' Name='Profit Target OCO 30 Ticks B' State=Initialized Instrument='MU' Action=BuyToCover Limit price=43.58 Stop price=0 Quantity=500 Strategy='SiBlackBird' Type=Limit Tif=Gtc Oco='2828566281436402032' Filled=0 Fill price=0 Token='d56a52de272c4bc0bdfd7abf5222ff2c' Gtd='12/1/2099 12:00:00 AM'

                  Is this OCO ID reused by your strategy? Or could you go into further detail about how OCO is handled when your strategy submits orders?

                  I look forward to your reply.

                  The Order ID is one that is generated by NinjaTrader before the order is sent to your broker. This makes me further suspicious of OCO mode since we know that all other orders without OCO mode work, and this is the exact symptom which would occur when a duplicate or erroneous OCO ID is used with a live order.
                  Patrick G.NinjaTrader Customer Service

                  Comment


                    #10
                    what cpabiz20k was experiencing was due to the submission of an OCO order without a partner order. To resolve this, we needed the strategy to be adjusted so that it either submits orders in pairs (or more) when using OCO, or if a single order is needed, OCO is not used.

                    In the TD Ameritrade connection guide, you'll find a disclaimer regarding the use of OCO specifically:

                    https://ninjatrader.com/ConnectionGu...nnection-Guide

                    "When submitting orders within an OCO group, the orders must be submitted as a pair and after submission, those orders will no longer be modifiable. To make a change to an OCO grouped order it must be cancelled and resubmitted. ATM functionality which would modify submitted stops and targets on TD Ameritrade accounts are therefore not supported."
                    Patrick G.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by aligator, Today, 10:11 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post aligator  
                    Started by psquare, Today, 03:11 PM
                    4 responses
                    18 views
                    0 likes
                    Last Post psquare
                    by psquare
                     
                    Started by ballboy11, Today, 03:20 PM
                    1 response
                    12 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by tonynt, Today, 02:18 PM
                    1 response
                    10 views
                    0 likes
                    Last Post NinjaTrader_JoshG  
                    Started by denalek2419, Today, 01:46 PM
                    3 responses
                    12 views
                    0 likes
                    Last Post NinjaTrader_ChristopherJ  
                    Working...
                    X