Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with strategy on live Ameritrade account

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

    #16
    Will R25 allow me to connect/authorize my AMTD account on Win 11?

    Comment


      #17
      Hi zgdesign, yes it will let you connect as long as your license key is in.

      Comment


        #18
        Here's a screenshot of the version I had installed prior and the AMTD authorization did not work on Win 11. Is this the same version?

        Comment


          #19
          Hi zgdesign, R25 is the previous version. If this will not let you connect you will need to stay on R26. I do not have any other versions I can provide other than the current and previous one.

          Comment


            #20
            Just ran R25 on a different Win 10 machine. Same thing happens, but on top of it NT still sees the position open after it gets stopped out.
            Attached is a screenshot for reference.

            Comment


              #21
              Hi zgdesign, I must make a correction to what I said earlier about modifying your stop loss, the connection guide tells us that an OCO order must be canceled and re-submitted to be modified:

              https://ninjatrader.com/ConnectionGu...nnection-Guide
              1. 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.

              Comment


                #22
                Hello Chris,
                Ok, but as I said in my original post, I'm not trying to modify the OCO order in any way. It's just a simple OCO order with a static stoploss/profit target.
                This is the most basic of functions, which I would expect to work.
                Also, this doesn't work on the previous version running on Windows 10 either.
                Last edited by zgdesign; 06-08-2022, 11:04 AM.

                Comment


                  #23

                  Hi zgdesign, I made a ticket with our development team and still waiting to hear about the order that gets stuck in Initialized state with the TDA connection.

                  Comment


                    #24
                    Originally posted by NinjaTrader_ChrisL View Post
                    Hi zgdesign, I made a ticket with our development team and still waiting to hear about the order that gets stuck in Initialized state with the TDA connection.
                    Hi Chris,
                    Do you have any updates on this? I'm at a standstill until this is resolved.

                    Comment


                      #25
                      Hi zgdesign, I just checked the status. There is a fix planned for the V8R27 update. There will be a notification in the platform when the update is released. Unfortunately, I can not give an exact time frame for when this will be, but It will be addressed in the next update.

                      Kind regards,
                      -ChrisL

                      Comment


                        #26
                        Originally posted by NinjaTrader_ChrisL View Post
                        Hi zgdesign, I just checked the status. There is a fix planned for the V8R27 update. There will be a notification in the platform when the update is released. Unfortunately, I can not give an exact time frame for when this will be, but It will be addressed in the next update.

                        Kind regards,
                        -ChrisL
                        Hi Chris,
                        Do you have any idea when the new release will be out?
                        I've been patiently waiting, but it's been 3 months now, and I'm still stuck with NT which doesn't work with AMTD.

                        Comment


                          #27
                          I still have no time frame for this update. I apologize but the support team does not know until the day of release.

                          Comment


                            #28
                            Originally posted by NinjaTrader_ChrisL View Post
                            Hi zgdesign, It would be for manual orders. For the strategy, please try this method of submitting protective orders:



                            This is the first time the issue has been reported, so it's possible it showed up in R26. You can try reverting back to R25 by first uninstalling through the Windows Control Panel, then install the previous version from here (look below the current release)
                            ninjatrader.com/GetStarted
                            Hi Chris,
                            Given that I can't run any strategies with OCO orders until the next release, and there's no timeframe on when that will actually happen, I'm willing to try anything at this point to get my strategies running live.
                            Can you please elaborate on your reply above? Perhaps some example code of how to place protective orders using OnOrderUpdate() and OnExecutionUpdate()?

                            Comment


                              #29
                              Hi zgdesign, Im sorry for the delay. The example I posted earlier has an example code file at the bottom for download:

                              Comment


                                #30
                                Originally posted by NinjaTrader_ChrisL View Post
                                Hi zgdesign, Im sorry for the delay. The example I posted earlier has an example code file at the bottom for download:
                                https://ninjatrader.com/support/help...and_onexec.htm
                                Hi Chris,

                                So I was able to get the order to submit via OnOrderUpdate and OnExecutionUpdate, however when the order fills it fills with either a stoploss, or a profit target, but not both. It seems like one of the two cancels the other out, because I see the stoploss in TOS, but then it cancels out once the profit target shows up. Is there a way to make it an OCO order, with both a profit target and and a stoploss?

                                This is the code I'm using:

                                private void myOrderFunction(){
                                // Submit an entry market order if we currently don't have an entry order open and are past the BarsRequiredToTrade bars amount
                                if (entryOrder == null && Position.MarketPosition == MarketPosition.Flat && CurrentBar > BarsRequiredToTrade)
                                {
                                /* Enter Long. We will assign the resulting Order object to entryOrder1 in OnOrderUpdate() */
                                EnterLong(1, "MyEntry");
                                Print("entering LONG");

                                }
                                {
                                }
                                }

                                protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
                                {
                                Print(execution.ToString());
                                /* We advise monitoring OnExecution to trigger submission of stop/target orders instead of OnOrderUpdate() since OnExecution() is called after OnOrderUpdate()
                                which ensures your strategy has received the execution which is used for internal signal tracking. */
                                if (entryOrder != null && entryOrder == execution.Order)
                                {
                                if (execution.Order.OrderState == OrderState.Filled || execution.Order.OrderState == OrderState.PartFilled || (execution.Order.OrderState == OrderState.Cancelled && execution.Order.Filled > 0))
                                {
                                // We sum the quantities of each execution making up the entry order
                                sumFilled += execution.Quantity;

                                // Submit exit orders for partial fills
                                if (execution.Order.OrderState == OrderState.PartFilled)
                                {
                                stopOrder = ExitLongStopMarket(0, true, execution.Order.Filled, execution.Order.AverageFillPrice - 4 * TickSize, "MyStop", "MyEntry");
                                targetOrder = ExitLongLimit(0, true, execution.Order.Filled, execution.Order.AverageFillPrice + 8 * TickSize, "MyTarget", "MyEntry");
                                }
                                // Update our exit order quantities once orderstate turns to filled and we have seen execution quantities match order quantities
                                else if (execution.Order.OrderState == OrderState.Filled && sumFilled == execution.Order.Filled)
                                {
                                // Stop-Loss order for OrderState.Filled
                                stopOrder = ExitLongStopMarket(0, true, execution.Order.Filled, execution.Order.AverageFillPrice - 4 * TickSize, "MyStop", "MyEntry");
                                targetOrder = ExitLongLimit(0, true, execution.Order.Filled, execution.Order.AverageFillPrice + 8 * TickSize, "MyTarget", "MyEntry");
                                }

                                // Resets the entryOrder object and the sumFilled counter to null / 0 after the order has been filled
                                if (execution.Order.OrderState != OrderState.PartFilled && sumFilled == execution.Order.Filled)
                                {
                                entryOrder = null;
                                sumFilled = 0;
                                }
                                }
                                }​​

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by NullPointStrategies, Yesterday, 05:17 AM
                                0 responses
                                59 views
                                0 likes
                                Last Post NullPointStrategies  
                                Started by argusthome, 03-08-2026, 10:06 AM
                                0 responses
                                134 views
                                0 likes
                                Last Post argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                74 views
                                0 likes
                                Last Post NabilKhattabi  
                                Started by Deep42, 03-06-2026, 12:28 AM
                                0 responses
                                45 views
                                0 likes
                                Last Post Deep42
                                by Deep42
                                 
                                Started by TheRealMorford, 03-05-2026, 06:15 PM
                                0 responses
                                50 views
                                0 likes
                                Last Post TheRealMorford  
                                Working...
                                X