Getting FALSEfake) Stop price order rejected When running Market Replay with playback .
When running the same script with playback in historical mode its seem that there is no problem.
The Error pop up windows that I received “ Stop price can’t be changed above the market ….”
This is false(fake) error because my stop order for long position was 2 cents bellow the bid price.
Also printing from the order state the Bid & ask and my stop & and stop limit price shows that there is no problem and that the order state never reached to “Rejected”.
The NT trace log file show that there is no problem and that the order state never set to “Rejected”
I wrote a test script for this issue and debug it Please see attached file DbgStgStopOrderRejected.cs
I also ran the script with “RealtimeErrorHandling = RealtimeErrorHandling.IgnoreAllErrors;“
I ran the script with debagger and I insert a breakpoint in OnOrderUpdate function
Inside the case of “if (order.OrderState == OrderState.Rejected || order.OrderState == OrderState.Unknown)”
Please see attached file “Debug_breakpoint.png”
The debugger Never insert to the order rejected case.
As I wrote the problem is when running Market Replay with playback .
In order to reproduced this its need to give it a time to happened ,please see attached file for my script test.
For example you can test with market replay the AAL at 03/04/2019
Sincerely, Kobi
Comment