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
Comment