Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Id vs OrderId

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

    Id vs OrderId

    I'm looking for a way to catalog orders and my understanding is that order.OrderId can be changed on the brokers end. So I wouldn't want that.


    Order order = execution.Order;
    Print( order.OrderId);
    Print(order.Id);

    When I print out the two values I get something like ID: 7401 OrderID: 415464669

    Am I able to assume that order.ID will remain constant, or can it change in the same way the OrderId can change?

    #2
    Hello HandsFreeTrader,

    The orderId can change as mentioned in the help guide so that would not be useful for tracking purposes. Order.Id is not documented so that also would not be suggested for use. Generally when you track orders you would use the orders name and supply a unique name to the order, that would not change and would be something you can track it with. If you are using the addon framework to submit orders you can specify a name when submitting orders.

    Comment


      #3
      Hi Jesse,

      For tracing orders on the broker side for NijaTrader broker which ID can be used? Currently I am seeing orderid like 'NT-00027-1914" from inside the ninjascript print statement and on the Nijatrader backend logs and on the account report side something like "201214071229". If we use the names for tracking, is there a way to get that in the NijaTrader broker report? Would like to understand how best to do the tracing of the orderids from the code front end side and the actual orders on the backend / broker side.

      Appreciate your recommendation for this.

      Comment


        #4
        Hello uchauhan,

        You should be able to from the grid see the updated ids for orders and compare that to your broker statement. In NinjaScript you would need to use a Signal name as mentioned previously. Signal names are used to give orders specific names so you can track them in your code. Since you can't access the brokers report or finalized ids in code the order id would not be relevant for that use.

        Comment


          #5
          Thanks Jesse, I am using the signal name already and see that in many of the records. There are few entries in the logs that just have a signal nsame of "Sell Order" and not the name that I specified in the strategy. I am trying to trace these orders in my NinjaTrader Account reports (NinjaTrader is my broker as well). Is there a way to see the signal name in the reports from the NT account reports?

          Comment


            #6
            Hello uchauhan,

            There is not a way to use signal names with broker statements, you have to use that inside the platform I would suggest using print statements to output how your logic is working to see when the order appears which print statements are executed.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            559 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
            546 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