Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"Working" ID returns "order with ID/Name does not exist"?

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

    "Working" ID returns "order with ID/Name does not exist"?

    Why does the orderId from Working status return "order with ID/Name does not exist"?

    Code:
    2025-04-02 07:09:29:472|1|32|Order='194103833191/DEMO724162' Name='' New state='Submitted' Instrument='ES 06-25' Action='Sell' Limit price=5642.75 Stop price=5641.75 Quantity=1 Type='Stop Limit' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-04-02 07:09:29:472|1|16|OnOrderUpdateHandler triggered for OrderId: 194103833191
    2025-04-02 07:09:29:472|1|16|Wrote order log entry to CSV: C:\Users\ASUS\Documents\NinjaTrader 8\GlefdarAutoTrader\NinjaTraderOrderIDLog.csv
    2025-04-02 07:09:29:474|1|32|Order='194103833191/DEMO724162' Name='' New state='Accepted' Instrument='ES 06-25' Action='Sell' Limit price=5642.75 Stop price=5641.75 Quantity=1 Type='Stop Limit' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-04-02 07:09:29:474|1|16|OnOrderUpdateHandler triggered for OrderId: 194103833191
    2025-04-02 07:09:29:474|1|16|Wrote order log entry to CSV: C:\Users\ASUS\Documents\NinjaTrader 8\GlefdarAutoTrader\NinjaTraderOrderIDLog.csv
    2025-04-02 07:09:29:475|1|32|Order='194103833191/DEMO724162' Name='' New state='Working' Instrument='ES 06-25' Action='Sell' Limit price=5642.75 Stop price=5641.75 Quantity=1 Type='Stop Limit' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-04-02 07:09:29:475|1|16|OnOrderUpdateHandler triggered for OrderId: 194103833191
    [snip]
    2025-04-02 07:09:44:924|1|64|Instrument='ES 06-25' Account='DEMO724162' Average price=0 Quantity=0 Market position=Flat Operation=Remove
    2025-04-02 07:09:46:654|1|1|ATI, 'CANCEL;;;;0;;0;0;;;194103833191;;' processing
    2025-04-02 07:09:46:654|3|1|OIF, 'CANCEL;;;;0;;0;0;;;194103833191;;' order with ID/Name '194103833191' does not exist
    Can anyone please tell me exactly what the ID parameter in "ATI, 'CANCEL;;;;0;;0;0;;;194103833191;;'" needs to be instead of 194103833191 to cancel this order with the same ID:

    Order='194103833191/DEMO724162' Name='' New state='Working' Instrument='ES 06-25' Action='Sell' Limit price=5642.75 Stop price=5641.75 Quantity=1 Type='Stop Limit' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''

    This seems completely insane to me. What am I missing? Is there a simple, straightforward answer for what the ID parameter needs to contain instead of "194103833191" to make the cancellation process correctly instead of returning "order with ID/Name does not exist"?​

    #2
    Hello Glefdar,

    Thank you for your post.

    To clarify, you're working with OIF files correct?

    Are you using the correct format for submitting a CANCEL? I see your call includes "0"s which is not included in the documented syntax.

    CANCEL COMMAND

    CANCEL;;;;;;;;;;<ORDER ID>;;[STRATEGY ID]

    Comment


      #3
      Originally posted by NinjaTrader_Gaby View Post
      Hello Glefdar,

      Thank you for your post.

      To clarify, you're working with OIF files correct?

      Are you using the correct format for submitting a CANCEL? I see your call includes "0"s which is not included in the documented syntax.

      CANCEL COMMAND

      CANCEL;;;;;;;;;;<ORDER ID>;;[STRATEGY ID]

      https://ninjatrader.com/support/help..._files_oif.htm
      Hello Gaby, thanks for the prompt reply. I'm using the ATI. Those 0s should be correct for the empty int parameters that the ATI will accept in C# (for example, the CancelAllOrders ATI function is tested and confirmed to work correctly with identical syntax and parameters except for not including the OrderId parameter). The application log clearly shows that the required parameter ID/Name '194103833191' is being passed with the syntax I used. The issue is that it says "not found" even though it is the same ID as the order seen above with Working state.

      Comment


        #4
        Please send me your log and trace files so that I may look into what occurred.


        You can do this by going to the Control Center-> Help-> Email Support


        Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.


        Please reference the following ticket number in the body of the email: Case Number: 06009035​ ATTN Gaby​

        Comment


          #5
          Originally posted by NinjaTrader_Gaby View Post
          Please send me your log and trace files so that I may look into what occurred.


          You can do this by going to the Control Center-> Help-> Email Support


          Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.


          Please reference the following ticket number in the body of the email: Case Number: 06009035​ ATTN Gaby​
          Each time I try to email support, I get an error message: "Your message could not be sent. The limit on the number of allowed outgoing messages was exceeded. Try again later." (even though I have never emailed support or sent outgoing messages before).

          However, I think that there is probably no solution: I think what is happening is that the ATI cancel command only works with ATI-generated orderIDs. So when it returns "Order id not found" for the broker-generated ID that was used as the orderID parameter, it is correctly stating "the broker-generated ID was not found as an ATI-generated ID". Of course this makes the ATI functionally almost worthless, and this seems to be a deliberate design choice by the company unfortunately. If there is a straightforward answer to my original question ("Can anyone please tell me exactly what the ID parameter in "ATI, 'CANCEL;;;;0;;0;0;;;194103833191;;'" needs to be instead of 194103833191 to cancel this order with the same ID?") then I'd love to hear but I think I've already answered my own question and the answer is unfortunately negative.​

          Comment


            #6
            Hello,

            You could instead email us directly at scriptingsupport[at]ninjatrader[dot]com, and follow the steps below to manually attach your log and trace files to your response so I may investigate this matter further.
            • Open your NinjaTrader folder under My Documents.
            • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
            • Send the 2 compressed folders as attachments to this email.
            • Once complete, you can delete these compressed folders.

            The ID parameter in the CANCEL call should be the order ID. Which is why we requested the log and trace to investigate further.

            Should you wish to continue this inquiry, feel free to write into support with your log and trace.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            557 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X