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.

    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:

                      This is another issue with TDA that happens at random. "Almost" every day it happens upon launching NT for the first time on that day, but it can also happen during other times of the day. NT connects successfully to TDA price feed, but not to your live account. Due to this bug, all your positions show as 0. If you

                      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 CortexZenUSA, Today, 12:53 AM
                                0 responses
                                1 view
                                0 likes
                                Last Post CortexZenUSA  
                                Started by CortexZenUSA, Today, 12:46 AM
                                0 responses
                                1 view
                                0 likes
                                Last Post CortexZenUSA  
                                Started by usazencortex, Today, 12:43 AM
                                0 responses
                                5 views
                                0 likes
                                Last Post usazencortex  
                                Started by sidlercom80, 10-28-2023, 08:49 AM
                                168 responses
                                2,266 views
                                0 likes
                                Last Post sidlercom80  
                                Started by Barry Milan, Yesterday, 10:35 PM
                                3 responses
                                13 views
                                0 likes
                                Last Post NinjaTrader_Manfred  
                                Working...
                                X