Support Board
Date/Time: Sat, 05 Jul 2025 16:08:19 +0000
Post From: Fill happening at a price not touched by ticks before
[2020-11-08 21:53:43] |
PanCSI - Posts: 9 |
Hi. I have a strategy that does certain actions above max and below min for the session. The code starts like this: for (int Index = StartingIndex; Index < TimeSalesArray.Size(); ++Index)
{ s_TimeAndSales Record = TimeSalesArray[Index]; Record *= sc.RealTimePriceMultiplier; // Do not process already processed sequence numbers. if (Record.Sequence <= r_LastTimeAndSalesRecordSequence) { continue; } sc.AddMessageToLog("Processing messages", 0); updateMaxMinRangeForSession(sc, Record.Price); Below this code I have some logic that should only happen below the session min price, which is being stored and printed out to the message log. I see a situation, when backtesting, where the message log prints the price moving down until 3300.50 in the ES. The following situation prints a message about an order being filled, once again further down the code, with fillprice being 3299.75. I am not sure if this is because I am in Backtest, or if this is intended behaviour and fill messages are sometimes received before tick prices if there is a gap in the order book. This is a stop limit order, and I am trying to understand how the price can "skip" 3 ticks, fill my order, but never have a tick with the expected price. Am I checking the min and max value of the session agains the wrong variable? How does the matching engine in Sierra's backtests work? Does it fill the stop orders in a way that they can be filled beyond the price that was touched by a tick? Or does it just fill orders if their price is surpassed? Or does it have a finer grained algorithm that processes place in queue? |