Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8-TDA orders submitted never get an updated status

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

    #31
    Thanks to everyone for contributing their symptoms/work around/further details.

    As previously stated, the Development Team is actively working on a new API for TD Ameritrade in which I suspect many of these symptoms will be eliminated. I'll follow up when I have more information.
    Patrick G.NinjaTrader Customer Service

    Comment


      #32
      Patrick,

      Can you confirm your Devs agree with our assessment?

      Can you provide an ETA on the new API?

      What exactly is the the new TDA API supposed to address?

      Can you outline or list the features or bug-fixes in this new API.

      As you can imagine, I'm a little concerned about the current state of NT/TDA and its longterm stability and viability. Do you have a rough number of NT users that trade with TDA?

      Thanks for answering each question. I think we'd like some transparency so we can build some confidence going forward.

      Comment


        #33
        Patrick,

        Wanted to add another data point for today. Same situation, where when things work, they work fine. However, most of the day exhibited the same symptoms previously outlined. It's very binary, either it works or it doesn't.

        Thanks!

        Comment


          #34
          Today 3/26, at 10:40am EST did not work. 12pm EST till close worked great, where I had 200+ successful trade executions. We just need to figure out why it doesn't work in the morning. The last hour of trade was very busy and volatile, yet NT/TDA handled it fine. For that, I'm thankful.

          Comment


            #35
            @MarketMaker Same here.

            Comment


              #36
              Today 3-27, morning was a bit different. Still not working, but different behavior. When I started my strategies, it seemed like they weren't able to get the data it needed to run normally. I was connected to TDA, but didn't see any progression or typical activities in my strategies. I shut it down and restarted in the afternoon and everything worked as normal.

              Comment


                #37
                Today 27/3, still the same pattern that orders do not get their filled status even though they are filled in the first hours of trading.
                The difference today was that I've seen the orders transition from "submitted" to a "working" status, but did not get any further updates from that status.
                They started working fine from around 11hs Eastern.
                Dear @NinjaTrader_PatrickG, I've got the feeling this is something to do with the TDA servers, that's why I suggested if your team could discuss the issue with the TDA API guys, maybe they could figure it out. This is all a guess as that is all we can do ourselves, as users, from this side of things.
                Thank you

                Comment


                  #38
                  Hi, I am not a pro-programmer but here are some ideas to tackle and workaround these NT-TDA issues until they are resolved. In the current condition, NT is broken and seriously compromised when used with TDA. Manual supervision of NT is necessary at all times.
                  ================================================== ================================
                  // IORDER DECLARATIONS
                  private Order enterLong = null;
                  private Order enterShort = null;
                  private Order exitLong = null;
                  private Order exitShort = null;
                  // BOOL VARIABLES TO KEEP TRACK OF ORDER FILLING
                  private bool bc_filled = false; //BUY TO COVER = EXIT SHORT
                  private bool long_filled = false;
                  private bool sell_filled = false; //SELL = EXIT LONG
                  private bool short_filled = false;
                  // OTHER VARIABLES TO HELP DETECT ANY ORDER ISSUES
                  private DateTime = entry_time;

                  CODE INSIDE ONBARUPDATE WHEN ENTERING A TRADE:
                  =============================================
                  entry_time = DateTime.now; //SET THE ENTRY TIME / USED ON LIVE STRATEGY WHEN SENDING AN ORDER

                  bc_filled = false; // WHEN SENDING AN EXIT SHORT ORDER
                  long_filled = false; // WHEN SENDING A LONG ORDER
                  sell_filled = false; // WHEN SENDING AN EXIT LONG ORDER
                  short_filled = false; // WHEN SENDING A SHORT ORDER

                  CODE INSIDE ON EXECUTION:
                  ========================
                  //IF ANY OF 4 ORDER TYPES IS FILLED -> UPTATE THE FILLED BOOL VARIABLE TO "filled"

                  if (execution.Order != null && execution.Name == "EXIT SHORT = BUY TO COVER" && execution.Order.OrderState == OrderState.Filled) {bc_filled = true;}
                  if (execution.Order != null && execution.Name == "EXIT LONG = SELL" && execution.Order.OrderState == OrderState.Filled) {sell_filled = true;}
                  if (execution.Order != null && execution.Name == "LONG CONDITION TRIGGERED" && execution.Order.OrderState == OrderState.Filled) {long_filled = true;}
                  if (execution.Order != null && execution.Name == "SHORT CONDITION TRIGGERED" && execution.Order.OrderState == OrderState.Filled) {short_filled = true;}

                  AT THE START OF ONBARUPDATE:
                  ===========================

                  //IF ANY OF 4 ORDER TYPES IS NOT NULL

                  if ( (enterLong != null || enterShort != null || exitLong != null || exitShort != null) && //ANY ORDER HAS BEEN TRIGGERED

                  (bc_filled == false || long_filled == false || sell_filled == false || short_filled = false) ) //ANY OF THE 4 BOOLS IS NOT TRUE = NOT FILLED YET

                  {

                  if ((DateTime.Now - entry_time).TotalSeconds > 40) // LIVE // A MARKET ORDER HAS NOT BEEN FILLED AFTER 40 SECONDS

                  {
                  string msg = Instrument.MasterInstrument.Name+" | Order not filled after 40 seconds";
                  Log(msg, LogLevel.Error);
                  }
                  else if ((DateTime.Now - entry_time).TotalSeconds > 80) // LIVE // A MARKET ORDER HAS NOT BEEN FILLED AFTER 80 SECONDS

                  {
                  string msg = Instrument.MasterInstrument.Name+" | Order not filled after 80 seconds";
                  Log(msg, LogLevel.Warning);
                  }
                  else if ((DateTime.Now - entry_time).TotalSeconds > 120) // LIVE // A MARKET ORDER HAS NOT BEEN FILLED AFTER 120 SECONDS

                  {
                  string msg = Instrument.MasterInstrument.Name+" | Order not filled after 120 seconds";
                  Log(msg, LogLevel.Alert);
                  // TRIGGER AN EVENT OF YOUR CHOICE //
                  SetState(State.Terminated);
                  }

                  }
                  Last edited by bertochi; 03-28-2020, 11:23 AM.

                  Comment


                    #39
                    bertochi I agree that this might be a TDA problem. It feels like they're purposely disabling, slowing down, or de-prioritizing API access during mornings. It seems like the NT developers could just ask TDA what's going on in the mornings. Maybe TDA wants to limit API access to avoid overloading their systems during heavy turbulence?

                    My worry is that when the new NT API is released, this problem will still exist. I hope that NT developers and support can get clear answers from TDA now, so that when the new API is released, there's not yet another delay til resolution. Can we not try to understand the problem now in parallel with getting the API released? Hoping the new API fixes the issue doesn't seem like the most logical way forward, unless we understand the problem first and have a clear solution to address.

                    A week as passed without an update from NinjaTrader_PatrickG. Hope he updates us soon!

                    Comment


                      #40
                      To all TDA users, please be advised there is another issue with the TDA-API other that the orders issue we are tracking here, but still related to the API. I have created a separate post for such issue. If interested you can read about it here:

                      https://ninjatrader.com/support/foru...s-your-request

                      Comment


                        #41
                        bertochi I've not seen any new issues with TDA today. In fact, this is the first morning in days that I've been able to trade with NT. So far so good today.

                        Comment


                          #42
                          @MarketMaker Agree. There was a slow transition of the order status in the first 30 minutes of trading, but they were not stuck as in previous days, and it cleared out from 10am Eastern. This is consistent with the idea that it "might", as a guess, be a TDA server issue, a different timing of response, or similar, to explain this behaviour we had to cope with. I hope this gets properly addressed.

                          Comment


                            #43
                            Just wanted to report that today was an error-free day for me. All trades were successful! Hoping this continues.

                            Comment


                              #44
                              Update. 31/03 at 13:30hs Eastern Time.
                              - Same behaviour as when we started this post. Orders would not get an updated status during the first hour of the day.
                              - From around 12hs Eastern Time, orders get updated as they should.
                              - I am also tracking the positions after orders are sent, and not all positions are getting updated after a trade has been executed. For example, Strategy position is showing as long, but account (broker) position is showing as flat. Upon checking the log, it appears the line that should read like "Position, Instrument xxx Account xxx Price xxx Quantity xxx Market position=Long Operation=Operation_add IS MISSING... I have added code inside my strategies so that if the strategy goes out of sync for more than 180 seconds, it should trigger an alert and I will take care of that by restarting NT.

                              Comment


                                #45
                                bertochi I agree. I did many trades today and many of them were fine. However, I had 5 trades that had this new error: "The order could not found. Please check its status."

                                When my strategy attempts to move an existing stop, it occasionally hits this error. It's not my code because stops move consecutively successfully (trailing stop), and all of a sudden this error happens and breaks the trade. I'm not sure why the order is not found, but it might be related to slow confirmations from TDA and NT not having the order ready to update.

                                This inconsistency is frustrating. I hope this gets sorted out with the new API.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by torch2k, Today, 10:17 AM
                                1 response
                                5 views
                                0 likes
                                Last Post NinjaTrader_BrandonH  
                                Started by pilotfo, Today, 10:59 AM
                                0 responses
                                3 views
                                0 likes
                                Last Post pilotfo
                                by pilotfo
                                 
                                Started by UltraNIX, Today, 10:38 AM
                                0 responses
                                7 views
                                0 likes
                                Last Post UltraNIX  
                                Started by Photon66, Today, 09:49 AM
                                1 response
                                12 views
                                0 likes
                                Last Post NinjaTrader_BrandonH  
                                Started by jeff_dw, Today, 09:55 AM
                                1 response
                                5 views
                                0 likes
                                Last Post NinjaTrader_ChrisL  
                                Working...
                                X