Support Board
Date/Time: Thu, 13 Feb 2025 10:38:29 +0000
Post From: Help understanding bar-based backtest fill
[2020-11-29 16:37:44] |
jwick - Posts: 142 |
I'm trying to understand this line in the documentation for fill logic: "During a bar based back test, a resting Limit order will not fill at a price better than the Limit price if the bid and ask prices processed are beyond the Limit order price and have triggered the Limit order price. Instead the order will be filled at the Limit order price, which can be a worse price than the processed bid and ask prices." Unless I am misunderstanding, I am experiencing the opposite (getting a fill better than limit order price) when running a bar based backtest as seen in this fill: ActivityType DateTime Symbol OrderActionSource InternalOrderID ServiceOrderID OrderType Quantity BuySell Price Price2 OrderStatus FillPrice FilledQuantity TradeAccount OpenClose ParentInternalOrderID PositionQuantity FillExecutionServiceID HighDuringPosition LowDuringPosition Note AccountBalance ExchangeOrderID ClientOrderID Fills 2019-10-14 06:54:00.003 [Sim]MNQ-202012-GLOBEX-USD Trade simulation fill. Bid: 7814.50 Ask: 7814.75 Last: 7814.50 29626 29626 Stop Limit 1 Buy 7820.75 7820.75 Filled 7814.75 1 Sim1 Open 3 29626.1 7823.00 7801.25 0.00 The bid/ask is 7814.50/7814.75. The stop/limit price is 7820.75/7820.75. If I understood the documentation, the fill should be at 7820.75; however, I get a fill at the ask of 7814.75 even though the ask price is beyond the limit order price. |