• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 Bidder, Today, 01:50 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by markbb10, Today, 01:50 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by Orden33, Today, 10:09 AM
            3 responses
            9 views
            0 likes
            Last Post NinjaTrader_Jim  
            Started by martyn73, Today, 10:18 AM
            4 responses
            13 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by silverm3170, Today, 10:03 AM
            6 responses
            10 views
            0 likes
            Last Post silverm3170  
            Working...
            X