Limit fills and queue lots
A resting limit order fills when the simulated market reaches its price under the rule you pick. The rule is the Limit fill setting. It applies to limit orders only, because stops always fill on touch.
Where to set it
In the Backtester, open Settings and find Fills and fees: Limit fill, then Through ticks or Queue lots. A run can override them in the Engine & execution card. In Paper, Settings has Limit fill, Ticks through and Queue lots. Live instances use the exchange's fills.
Through N ticks
A resting limit fills once price trades N ticks past its level, and the fill lands at the limit price. The app default is Through N ticks with N = 1. Setting 0 fills the moment price touches the level.
Queue at level
In Paper this choice is called volume at level. The order joins the back of a queue at its level:
- It becomes active after the latency you set, and only volume that trades after that counts.
- Each print at the level on the side that would fill the order adds its size to the count. For a buy limit that is a print from a seller. For a sell limit it is a print from a buyer. A print with an unknown side counts for both.
- The order fills, at its limit price, once the count reaches the Queue lots plus its own size.
- If price trades one tick through the level, the order fills at once, because the queue has been swept.
A limit placed with the market already at its price rests at its level in this mode and clears by queue volume. In Through N ticks mode it fills at once instead, see Fills and slippage. A take-profit that price only touches and then reverses from does not fill.
Queue lots
Queue lots is the number of lots assumed to be ahead of your order. It is a fixed assumption, not read from the book. The app default is 500. Tune it until the simulated fill rate matches the fill rate you see on the venue or in paper.
Data needed
Queue at level needs per-print sizes, so it runs on tick data only. On 1s or 1m data it falls back to one tick through.
Not simulated yet
Your real position in the queue, from order-book (level 2) data, is coming. Until then the queue is the assumption above.