Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing Order_Error Invalid Order ID/Name

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

    Changing Order_Error Invalid Order ID/Name

    #1:
    1/6/2011 12:33:33 PM ATI AT, 'PLACE;Sim101;ES 03-11;BUY;2;MARKET;0;0;;;ES 03-11.T2S1.2;T2S1;T2S1-ES 03-11-2' processing

    #2:
    1/6/2011 12:33:39 PM ATI OIF, 'CHANGE;Sim101;ES 03-11;BUY;2;MARKET;0;0;;;ES 03-11.T2S1.2;;T2S1-ES 03-11-2' invalid order ID/Name 'ES 03-11.T2S1.2'

    In #1 above [Place order command] The Order ID given to order is shown in Bold.
    In #2 above [Change order command] The same Order ID given to original order is shown in Bold.

    Yet the #2 shows the error message, also shown in Bold, that the Order ID/Name is invalid, but they match as shown.

    I should add . . . this seemed to work yesterday but I was using "PLACE" to add to the order instead of "CHANGE" . . . which did not work in real-time today . . . giving error . . . "Order already exists" . . . so it seems "CHANGE" should work somehow.

    I have tried . . . "", . . . "Entry", . . . "Entry1", etc. and nothing works.

    Thanks for insight you can give.

    Dox
    Last edited by dox58333; 01-06-2011, 01:53 PM.

    #2
    Hello,

    Please take the periods and spaces out of the order ID. This should do the trick. I believe that - is ok though.

    Let me know if I can be of further assistance.

    Comment


      #3
      That proves not to be the problem. If I make the Order ID be Bob . . . Bob is not accepted in the "CHANGE" order for adding to position.

      So the question becomes . . . Can a position be added to using the 'CHANGE' command? . . . and if not . . . Can an existing order be added to by using the 'PLACE' command and the original Order ID?

      Neither of the above seems to work . . . I'm looking for verification that any addition to a position qty has to have a new Order ID . . . and hopefully this is not the case . . . as further changes are infinitely more complicated. This can't possibly be true.

      From the Ninja 7 Help file:
      CHANGE COMMAND
      This command will change the parameters of an order and requires an order ID value. The order ID value must match the order ID value given to an order placed through the PLACE command

      1/6/2011 1:10:15 PM ATI AT, 'PLACE;Sim101;ES 03-11;BUY;2;MARKET;0;0;;;BOB;T2S1;T2S1-ES 03-11-2' processing

      1/6/2011 1:10:34 PM ATI OIF, 'CHANGE;Sim101;ES 03-11;BUY;2;MARKET;0;0;;;BOB;;T2S1-ES 03-11-2' invalid order ID/Name 'BOB'

      Thanks for your help,
      Dox
      Last edited by dox58333; 01-06-2011, 02:26 PM.

      Comment


        #4
        Hello,

        Can you please check in the NT Control Center orders tab and see what the actual order ID is reported by NinjaTrader after the order is made.

        Comment


          #5
          Answer to your request: 40c6da3b1a59483a8ab327828a77ca13

          From a previous post a user writes:
          The order places and fills like it's supposed to, but it's not using the OrderID that I've supplied. In this case, the orderID variable is a GUID that I generate for each order. What's confusing is that I can see in the NinjaTrader log that it received my ID, but chose to assign a different one to the order. Is this expected behavior? How can I place an order with a user-assigned ID?

          and Ninja responds:
          this is expected behavior, you can assign a user defined order id to your ATI order to be able to CHANGE / CANCEL it from your external code later, so you have a reference.

          and user responds:
          Ok, thank you for the clarification. So NinjaTrader has an internal reference to my user-supplied OrderID, but will expose an application-supplied ID in the log. Is there a lifetime on my ID?

          and Ninja responds:
          This is correct bsgetson, the lifetime would be determined by when your order reaches a terminal state (cancelled / filled / rejected states).


          I'm supplying the above previous correspondence since the route you are going has already been clarified by Ninja. And clearly states that my user supplied Order ID is available for change . . . even though Ninja internally is supplying it's own ID.

          Thanks for your help,
          Dox

          Comment


            #6
            I am still looking for the answer to these questions, ie. a response to this thread.

            Dox

            Comment


              #7
              Hello,

              Did not see a question? Thought you had researched your own issue and you where good to go and closed the case.

              I take your still hving issue. I do see one thing that is a little off here:


              1/6/2011 1:10:15 PM ATI AT, 'PLACE;Sim101;ES 03-11;BUY;2;MARKET;0;0;;;BOB;T2S1;T2S1-ES 03-11-2' processing

              1/6/2011 1:10:34 PM ATI OIF, 'CHANGE;Sim101;ES 03-11;BUY;2;MARKET;0;0;;;BOB;;T2S1-ES 03-11-2' invalid order ID/Name 'BOB'

              Notice how on is:

              1/6/2011 1:10:15 PM ATI AT
              The other is:

              1/6/2011 1:10:34 PM ATI OIF

              Are you using two different Automation methods, the DLL interface to submit the order and a OIF to change it?

              Comment


                #8
                As I stated earlier . . . I posted the previous post material because you were going the route of looking at 'Ninja's Order ID like there was a problem there. I posted it so you didn't pursue that course of thinking. The problem still exists as I have shown.

                Answer to your current question is no. Same ATI method. I'm placing the order . . . and cannot add to the position using the 'CHANGE' command. OIF is a yellow message from Ninja that signifies a problem and Ninja is providing 'INFORMATION' about the problem . . . in this case it says the order ID's do not match . . . BUT THEY DO! . . . as I have shown.

                So let's solve this.

                Dox

                Comment


                  #9
                  dox58333, can you please contact me at support at ninjatrader dot com with your test strategy and trace / logs files from the day of the issue? I'll then look into your setup here on our end.

                  Thanks in advance,
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    This is not a test strategy and there is no day of issue.

                    You have a dll interface that is not working as it is described.

                    You have a 'PLACE' command . . . which as shown is working fine.

                    You have a 'CHANGE' command . . . which as shown is not working fine and gives an error message that I have provided.

                    and I have posted the two lines of code that should work according to your help file . . . and the 'CHANGE' command does not.

                    This is not a test strategy. Your function call filled out like the help file says . . . is not working.

                    You have the command lines in front of you.

                    This is not a test strategy.

                    Please have someone look at the code and see what the problem is.

                    Dox
                    Last edited by dox58333; 01-07-2011, 12:24 PM.

                    Comment


                      #11
                      Dox, I tested your scenario with the ATI's OIF file builder and don't see any issue: please go to Tools > ATI > General > OIF File Builder to PLACE > CHANGE an order with your user supplied order ID / Name. You can see the changes applied and working if the AT interface is enabled in your Control Center's order tab. The corresponding string can be viewed as well so you should get an idea how to debug your custom external code calling the interface functions.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Using the OIF builder produces all of the following:

                        1. OIF: Place order . . . formats as follows:
                        PLACE;SIM101;6E 03-11;BUY;2;MARKET;0;0;DAY;;Bob;T2S1;Sally

                        dll call formats as follows: (exact same except for 'DAY' is missing . . . but order processed fine. Added 'Day' and get same results)
                        ATI AT, 'PLACE;Sim101;6E 03-11;BUY;2;MARKET;0;0;;;Bob;T2S1;Sally' processing

                        2. OIF: Change order . . . formats as follows:
                        CHANGE;;;;4;;0;0;;;Bob;;Sally [Side Note: Now I don't see how this is going to "BUY" 2 or "Change" the Qty to 4 if it's not told to "Buy" 4 but . . . just doing what you said so . . .]

                        dll call formats as follows: [exact same as OIF builder except . . . SAME ERROR AS BEFORE
                        ATI OIF, 'CHANGE;;;;4;;0;0;;;Bob;;Sally' invalid order ID/Name 'Bob'

                        in other words . . . same problem as described from the beginning . . . and I will now restate the question.

                        How do you add to a position that is already open if Ninja will not accept the same Order ID as used in 'PLACING' the original order?
                        Last edited by dox58333; 01-07-2011, 01:40 PM.

                        Comment


                          #13
                          If you look at the OIF builder you can see that with the Change command selected . . . BUY or Sell is not an option . . . which suggests that you cannot add of subtract from an open order using the 'CHANGE' command . . . and OK . . . that makes sense . . . EXCEPT . . .

                          The 'PLACE' command will not let you add to an existing order because it gives you the error . . . 'Order ID' already in use.

                          So again . . . the question is how to add to a position without having multiple order ID's to have to keep track of. And by the way . . . why is 'Entry' not available like 'Target1' and 'Stop1' is. That would solve this problem also . . . and the help file suggests it is . . . but does not seem so.

                          Dox

                          Comment


                            #14
                            Dox,

                            Please see the linked video of placing a trade while calling an ATM strategy, changing the entry order, having it filled and still have the ATM strategy applied.

                            Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


                            In a nutshell, when you do CHANGE, you should not be providing the Strategy ID.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Josh,

                              Unfortunately the video runs neither in Chrome or Explorer. Just a blank screen on Explorer and perpetually 'opening' in Chrome.

                              Can you make sure it works and repost or something.

                              Dox

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by arvidvanstaey, Today, 02:19 PM
                              4 responses
                              10 views
                              0 likes
                              Last Post arvidvanstaey  
                              Started by samish18, 04-17-2024, 08:57 AM
                              16 responses
                              57 views
                              0 likes
                              Last Post samish18  
                              Started by jordanq2, Today, 03:10 PM
                              2 responses
                              8 views
                              0 likes
                              Last Post jordanq2  
                              Started by traderqz, Today, 12:06 AM
                              10 responses
                              18 views
                              0 likes
                              Last Post traderqz  
                              Started by algospoke, 04-17-2024, 06:40 PM
                              5 responses
                              47 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X