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 cre8able, Today, 01:16 PM
        2 responses
        9 views
        0 likes
        Last Post cre8able  
        Started by chbruno, 04-24-2024, 04:10 PM
        3 responses
        48 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by samish18, Today, 01:01 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by WHICKED, Today, 12:56 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by WHICKED, Today, 12:45 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X