Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

error message on change order

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

    error message on change order

    Hello. I have code that submits a change order to update stops based on certain conditions. I recently received an error that said something to the effect "cannot submit change order, values already match". what does that mean exactly? in this case, the new price that was being submitted for the order change did in fact match the prior price, though that was a bizarre coincidence. is the fact that the prices match what the error is referring to, or is there something else going on? any ideas how to address this?
    thanks,
    Colin

    #2
    Hello stewarco,
    Thanks for your post.
    • What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About (The most current version is 8.0.14.2)
    • Who are you connected to? This is displayed in green on lower left corner of the Control Center window.
    • Who is your broker?
    • What instrument (and expiry if applicable) have you selected? For example, ES 09-18, AAPL, EURUSD, etc.
    • What type of order was this? (Limit, Market, Stop,etc.)
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      info

      Hi Josh.
      - Using most current version
      - I'm connected to IB and Ninjabroker
      - Orders are sent to my Ninjabroker account
      - Instrument is ES 09-18
      - This was a Stop (market) order, for which I was submitting a Change for the Stop price, though as I mentioned the new price happened to be the same as the prior price, if that matters.

      Comment


        #4
        I'd like to take a look at your log and trace files when this occurred.
        Just reference this forum post with RE: Josh in the subject.
        You can include your log and trace files 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.
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          I checked out your files and I see the error:
          'Cannot change order '1936' because current order values already match.'
          which simply means that a change was submitted, but no actual changes were made. You may ignore this error.
          Josh G.NinjaTrader Customer Service

          Comment


            #6
            one more thing

            o.k. I made a minor change so that this can never occur, but when the Error did occur it shut down my strategy. is there a setting somewhere such that this wouldn't happen? are you also seeing the part where it stops the strategy and cancels all the outstanding related orders?

            Comment


              #7
              What are you setting for RealtimeErrorHandling in your strategy?

              Help Guide - RealTimeErrorHandling
              Josh G.NinjaTrader Customer Service

              Comment


                #8
                thanks

                ok looks like I've got the errorhandling set to cancel/close. need to decide if i'm set up to change that or not.
                thanks

                Comment


                  #9
                  I have the same error. the problem is that ninjatrader hangs when we get this error a few times. when there's a sudden movement of price the strategy causes this error to show up. eventhough i have set the RealTimeErrorHandling to ignore the error (that works), ninjatrader hangs after receiving this error and popping a mesage box a few times. Lost a lot of money because of this...

                  Comment


                    #10
                    Hello madankumars,

                    I would recommend that you change the logic of the script to not call change order if the new price is equal to the stop price of the working order. This would prevent the error from appearing.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      .....I would recommend that you change the logic of the script to not call change order if the new price is equal to the stop price of the working order. This would prevent the error from appearing....

                      Hello mates,

                      I have the same issue and I am stuck trying things.
                      Wich code can avoid the message appears?
                      "If the new price is equal to the stop price"
                      return for example..

                      How is the code?

                      Like the following.. it can work?

                      Code:
                      protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity, int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string nativeError)
                      {
                      if (Position.MarketPosition == MarketPosition.Short)
                      if (Close[0] == order.StopPrice)
                      
                      return;
                      if (Position.MarketPosition == MarketPosition.Long)
                      if (Close[0] == order.StopPrice)
                      
                      return;
                      }


                      Many thanks!

                      Bernard
                      Last edited by bcomas; 02-15-2021, 08:05 AM.

                      Comment


                        #12
                        Hello Bernard,

                        May I confirm you are still referring to the warning message:
                        'Cannot change order '1936' because current order values already match.'

                        Using Print() to print the values, what is the StopPrice of the working order before the change is attempted?
                        What is the value supplied to the order method for the new stop price? (order method like EnterlongStopMarket or ExitLongStopMarket)

                        Below is a link to a forum post that demonstrates using prints to understand behavior.

                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Hello Chelsea,

                          I get the error : MyLiveAccount, Cannot change order '462500420' because current order values already match. affected Order: BuyToCover 1 StopMarket @ 13716

                          "Only" when is Live Trading (Not in Sim) using the standard NT SetTrailStop(); funnction

                          I got the below answer in another forum: Seems that is a NinjaTrader bug under possible review but I am trying to remove it in some way.
                          I like how is trailing the standard NT SetTrailStop(); in my autostrategy and his performance and I dont know how to replicate it using the StopLoss() or some Exit methods to avoid the annoying messages using currently the SetTrailStop.



                          answer:

                          We have a feature request tracking interest to have NinjaTrader silently ignore these specific errors since the error itself may not be consequential. The ticket ID is SFT-3667 and I have added a vote on your behalf. This is an internal number, but for anyone else wishing to have their interest tracked, please let our support staff know that you would like a vote added for this request.

                          Feature Request Disclaimer.

                          We receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing.

                          When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number will be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

                          Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

                          Comment


                            #14
                            Hello bcomas,

                            I am seeing that you may be creating duplicate posts on the forum. We respectfully ask that you only create one inquiry. Creating multiple forum threads will create two separate tickets and may cause multiple technicians to start at the beginning of reviewing your inquiry, tying up resources with our platform support and delaying our ability to respond to all customers in a timely manner.

                            May I confirm that this a new inquiry and not related to the post below?


                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Understood. Thanks for your time. Yes its an old inquiri from 2018, still without solution. Frustrating for me and the Ninjatrader Platform users.

                              Bernard

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by funk10101, Today, 12:02 AM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by GLFX005, Today, 03:23 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Started by nandhumca, Yesterday, 03:41 PM
                              1 response
                              13 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by The_Sec, Yesterday, 03:37 PM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by vecnopus, Today, 06:15 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post vecnopus  
                              Working...
                              X