Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Delay 'Changes' to Order

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

    Delay 'Changes' to Order

    Current dilemma is this:

    Order is placed . . . and then I query Ninja for fill price . . .

    tPrc = AvgFillPrice(OrIDNow)

    #1: the thought is that if/when I get back the fill price the order must be filled? (else the OrIDNow would return as invalid)

    #2: then I compare to expected price, ie, analyzing slippage on entry. If different from best stats entry then I send changes.

    Problem is that the 'Changes' OIF error message is showing 'No such Order' and then immediately after the OIF message it's showing final execution of this 'No such Order'. In other words . . . AvgFillPrice is returning info prior to the fill and my changes are arriving before the 'ID' is in place.

    Question then . . . if AvgFillPrice doesn't work to accomplish this . . . what does . . . aside from waiting for the next bar?

    Best,
    Dox

    #2
    Hello dox58333,

    You can check the fill state of this order before attempting to access avg price.

    string NTOrderStatus(string orderId)
    Gets the order state (see definitions) for the orderId. Returns an empty string if the order ID value provided does not return an order.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      What's the difference between NTOrderStatus vs OrderStatus?

      The NT version of the function is listed as related to Trade Station.

      Are they both exactly the same? . . . ie, both reference the same external dll.

      Thanks,
      Dox

      Comment


        #4
        Hi Dox,

        Yes, they should work the same, but one applies specifically to TS integration. Here is the page for the standard dll functions:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        89 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        48 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        31 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        34 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        69 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X