Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NtDirect Functions - Order Status

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

    NtDirect Functions - Order Status

    I have used the NtDirect functions for a long time in commercial trading and they work very well. I'm starting up a new system and I've been reviewing how the functions work.

    NTOrders(Account): Returns a string of all orders for an account number with each order separated by a | character. If an order is repeated, then the string will contain multiple occurrences of that order ID.

    NTFilled(OrderID): Returns the quantity filled for a particular order ID. If an order ID is repeated, then it only returns the quantity for the last order.

    NTOrderStatus(OrderID): Returns the status for the most recent occurrence of OrderID.

    It would be helpful if the NTFilled and NTOrderStatus functions worked like the NTOrders function, but lacking that it would appear to be necessary to avoid repetition of any OrderID in order to get an accurate determine of order status and filled quantity.

    #2
    Hello Atomic,

    I'm not quite certain I understand.

    The NTOrders returns a list of orders for an account.

    With NTFilled this is returning information about a specific order by order id.

    Are you wanting to return a list of something?
    What would you like NTFilled to return a list of?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      If an order ID is repeated for new orders, then the NTOrders function will have repeated occurrences of the order ID in the returned string. However, the NTFilled command returns only fills related to the last occurrence of the repeated orderID, as far as I can tell.

      Comment


        #4
        Hello Atomic,

        Are you ensuring that each new OrderID used is unique?

        An OrderID should never be re-used if you are sending orders through the API. All new orders should have unique IDs.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Yes, that's what I'm noticing, but from the NT side, it seems to accept new orders with an old order ID without issue. Seems like it ought not to do that.

          Comment


            #6
            Hello Atomic,

            I will request that a note be added to the help guide on your behalf.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jclose, Today, 09:37 PM
            0 responses
            4 views
            0 likes
            Last Post jclose
            by jclose
             
            Started by WeyldFalcon, 08-07-2020, 06:13 AM
            10 responses
            1,413 views
            0 likes
            Last Post Traderontheroad  
            Started by firefoxforum12, Today, 08:53 PM
            0 responses
            9 views
            0 likes
            Last Post firefoxforum12  
            Started by stafe, Today, 08:34 PM
            0 responses
            10 views
            0 likes
            Last Post stafe
            by stafe
             
            Started by sastrades, 01-31-2024, 10:19 PM
            11 responses
            169 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X