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 jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,290 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        9 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        11 responses
        62 views
        0 likes
        Last Post halgo_boulder  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        8 views
        0 likes
        Last Post Option Whisperer  
        Started by halgo_boulder, 04-20-2024, 08:44 AM
        2 responses
        25 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X