Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market order rejected

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

    Market order rejected

    Got error for my stop order:
    Unable to change order '1565511988': Buy order stop price must be above last trade price ExchangeRejectCode = 2061
    It's NOT limit order, just simple stop one. The script was disabled as well.

    I was running the exactly same script on Sim101 with Kinetick connection simultaneously, no any this kind of errors. The error is only for my NTB account with CQG connection.

    #2
    Hello gjing,

    The error indicates that a stop order was placed on the wrong side of the market.

    Do you have logic in your script to ensure that the price you are using is at least 1 tick above the ask on the buy side or 1 tick below the bid on the sell side just before the order is placed?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      It's not a stop limit order, just a simple stop one. Never had this kind of errors in the past years.

      I just started trading with your NTB account opened last week. Also the account Sim101 had no any problems.

      Comment


        #4
        Hello gjing,

        The error message has not mentioned a stop limit order.

        The error is saying a stop order (stop market) order has been placed on the wrong side of the market.

        Are you finding information somewhere else about a limit or stop limit order?

        If you have not had this error previously, this may indicate your previous orders were on the proper side of the market.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I've never set stop limit order in my script. When the position is opened, I simply put a stop one and trail it with relative large ticks below or above.

          As I mentioned, I was running the exactly same script in account Sim101 using Kinetick as the connection simultaneously today, no any problems for that one. The problem only happened in my LIVE trading account opened with you last week. Not sure it's anything related that?

          Comment


            #6
            Hello gjing,

            I am uncertain why you are mentioning a stop limit order.

            The error message does not mentioned a stop limit order..

            To prevent the error, ensure your order is placed on the correct side of the market.

            The error is only going to occur when an order a stop market order is placed on the buy side at the ask or below or on the sell side at the bid or above. Likely you are submitting an order at the ask or the bid and this is being rejected.
            So choose a price that is on the proper side of the market.

            (In a fast moving market, its possible for the price to change just as an order is submitted causing that order to be at the ask or bid causing the order to be rejected. I would recommend increasing the distance to the ask or bid to prevent this)
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              I thought when the stop is triggered, it'll get executed as a market order, no matter whatever prices. Anyway, I'm using "SetStopLoss(CalculationMode.Price, StopPrice);" for my stop. Do you mean modify the StopPrice properly to prevent it happening again?

              Comment


                #8
                Hello gjing,

                That is incorrect.

                When using SetStopLoss() this will place a Stop Market order.

                From the help guide in the Tips section:
                "Stop loss orders are submitted as stop market orders"

                Below is a publicly available link to the help guide on SetStopLoss().


                I am advising you to use a valid price for your stop loss.

                Be sure the stop loss is being set before the entry order is placed. And ensure that the 'StopPrice' variable is set to a valid price before placing the stop loss.

                Below is a link to an example script called CustomStopStrategyWithTrailExample.zip that uses SetStopLoss().
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  That's why I always mentioned "Stop Market Order" because I always use SetStopLoss() for my stop. My understanding is once the stop gets triggered, it'll submit a market order to close the position, no matter what's the current market price, right? My stop price was always valid. I've been using the script for several years, never got this kind of errors. Even today I had two short trades, 1st was stopped out without any problems.

                  Only thing I can think of is something related with your brokerage account and CQG connection. As I said I just opened my NTB account last week and started trading for only a few days

                  Comment


                    #10
                    Hello gjing,

                    The error indicates that the price was not valid.

                    The order was a buy stop order placed at the ask or less or was a sell order placed at the bid or higher.

                    To prevent the error, increase the distance the stop is placed on the buy side above the ask or on the sell side below the bid.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      It doesn't make any sense to me. My order suppose to be a market one, no way to specify the price. The error should not happen for a market order. Again I was running the exactly same script in the simulating account Sim101, simultaneously, this morning, no any problems in that account. Only LIVE one was disabled.

                      Comment


                        #12
                        Hello gjing,

                        This incorrect.

                        SetStopLoss does not place a market order, this places a stop market order which has a stop price.

                        The stop price you are supplying to the SetStopLoss with the 'StopPrice' variable you have created and that you are supplying to the call of SetStopLoss.

                        The stop price of the stop loss order must be on the proper side of the market.

                        (Try placing a live manual stop order on the wrong side of the market to fully understand what is happening with the script)

                        The Sim101 fills orders locally using information coming from the market. A live order will be filled by the exchange. It is possible that the fills were not at the exact same moment and is possible that the ask or bid price was slightly different.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          I understand there may be slight differences between live and simulating ones, but the stop price of the stop loss order is definately on the right side for sure. I shorted around 5999 (NQ) this morning, it was held about an hour. The script lowered the stop price several times during that time period, and it's finally stopped out around 5982, which is good, except for getting the error.

                          Comment


                            #14
                            Hello gjing,

                            The error message indicates the order was rejected due to the stop price.

                            Are you able to reproduce the error?

                            If so, please print the time, stop pricem and the current ask or bid (depending on the direction of the order) just before the order is submitted and include the output with your next post so that we may see the stop price is at least one tick greater than the ask or one tick below the bid and the order is still being rejected. (An order at the ask or bid will be rejected)

                            Also, was this a live order?
                            Have you called your broker to ask why the order was rejected?
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              It's live order and my brokerage is you, ninjatrader brokerage.

                              Last question, I selected "Local OCO simulation" when setting up the CQG connection, is that the cause?

                              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,265 views
                              0 likes
                              Last Post sidlercom80  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              3 responses
                              12 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X