What matters
A correct signal does not determine how much of a passive order fills. Quantity already waiting ahead can absorb the available opposing flow. This 2027 experiment places the same invented buy order in two alternative queue positions, showing different fills and unrealized values without claiming that either position represents an observed market or a profitable strategy.
By Heath Muchena. 2027 research edition; pinned source review and original examples checked 28 November 2026. Documentation describes software capabilities; the calculations below do not run the reviewed projects or test a live account.
Same decision, different place in line
Suppose a strategy decides to buy forty units at a limit price of 100. In one alternative world, no displayed quantity waits ahead. In the other, seventy-five units wait ahead at the same price. Both worlds receive opposing sell flow of fifty units, then forty-five. The signal, price, order quantity and flow are identical; only the starting queue differs.
In the first world, the initial fifty-unit event can fill all forty units. In the second, it reduces the seventy-five units ahead to twenty-five and leaves the simulated order untouched. The next forty-five-unit event clears those twenty-five and leaves twenty units for the order. The final fills are forty and twenty.
These are counterfactual alternatives. They are not two simultaneous orders both claiming the same trade volume in one market. Keeping that distinction explicit prevents the example from creating the very duplicated allocation it is meant to clarify. Each world receives its own copy of the invented event sequence and computes a separate outcome.
What the source says about queue tracking
The pinned NautilusTrader trade-execution documentation describes queue tracking for limit orders with trade execution enabled. On acceptance, the model snapshots displayed size ahead at the order’s price. Correct-side trades reduce that quantity; only volume beyond the cleared queue is available to fill the simulated order on that event.
The documentation separately describes how different book updates and order modifications affect tracked priority. These rules make a richer replay possible, but they also expose the information required. The initial estimate depends on book state visible when the order is accepted. Historical data does not reveal hidden orders or every venue-specific priority rule.
The checked version record identifies v2.0.0rc10. This is a source review of that pinned development version, not an assertion about all releases or a claim that we ran the engine. The tool below is an independent one-price arithmetic model with a fixed starting quantity ahead. It does not implement the project’s complete event handling.
The two-world trace
| Event | World A: 0 units ahead | World B: 75 units ahead |
|---|---|---|
| Order accepted | 40 requested; 0 ahead | 40 requested; 75 ahead |
| Opposing flow 50 | Fill 40; order complete | Clear 50 ahead; 25 still ahead; fill 0 |
| Opposing flow 45 | No further order quantity | Clear 25 ahead; fill 20 |
| Total filled | 40 | 20 |
| Unfilled order quantity | 0 | 20 |
For a simple final check, total opposing flow is ninety-five. Subtracting the second world’s seventy-five units ahead leaves twenty available for the forty-unit order. The first world has no initial queue to clear, so the same total flow is enough to complete its forty units. The event trace additionally shows when those fills occur under the toy rules.
Now value each filled long position at an invented later mark of 101. The first has an unrealized mark contribution of forty quote units, and the second has twenty. Those amounts are filled quantity multiplied by the one-unit difference between mark and fill price. No sale occurs in the model, so neither value is realized proceeds.
Change the mark to 99. The first contribution becomes −40 and the second −20. Getting more filled is therefore not automatically better. Queue position changes exposure, and exposure can increase either favorable or unfavorable marked outcomes. A comparison that reports only a favorable mark would hide half of that relationship.
How to use the counterfactual calculator
The inputs define a passive buy at one fixed price. Choose its quantity, the amount ahead in each alternative world and a bounded comma-separated list of opposing flow events. The model first spends each event clearing the queue ahead, then allocates any remaining flow to the unfilled order. Filled quantity cannot exceed the requested quantity.
Only events assumed to trade against the buy side at the relevant price belong in this list. Total market volume, a candle’s volume or a same-side print is not automatically eligible flow. The model accepts the reader’s declared sequence; it does not inspect a venue feed or determine aggressor direction from raw data.
An exact boundary is useful. Enter a single flow event of seventy-five for the second world with seventy-five ahead. The queue reaches zero, but the order fills zero because the event has no volume left after clearing the queue. Reaching the front is not itself a fill. A subsequent eligible event would be needed to allocate quantity to the order.
The tool reports incremental fills and remaining quantity ahead after each event. It also reports final filled quantities and unrealized mark contributions. A zero order size is allowed as an arithmetic boundary and produces zero fills. The tool rejects negative quantities, missing events and non-finite values rather than interpreting them as market instructions.
What a real queue estimate still does not know
The source documentation warns that trades with an unknown aggressor side can reduce tracked queues on both sides, potentially clearing a queue and filling earlier than reality. That is a specific optimistic assumption worth preserving in a report. It should not disappear behind a generic claim that the model “supports order-book data.”
Our experiment avoids that ambiguity by explicitly declaring all input events to be opposing flow at one price. It also excludes cancellations ahead, hidden liquidity, price changes, queue resets after amendments and uncertain arrival time. Those exclusions make the arithmetic transparent, but they prevent it from estimating an actual trader’s likely fill probability.
The fill-model documentation distinguishes probability of a touched limit fill from explicit queue-volume tracking. A probability model and a displayed-volume queue model answer different questions. Choosing one requires describing the available data and the research purpose. Adding more parameters without evidence for them does not automatically make the result more reliable.
Separate three questions before comparing results
First ask whether the signal would submit an order under the specified information. Then ask whether the order would be eligible to fill under the execution assumptions. Finally ask what exposure and costs follow from the simulated fills. A good answer at the first stage does not settle the next two, and an attractive gross signal chart may say little about the quantity actually obtained.
Available size is also different from position in line. The companion liquidity-consumption experiment asks whether multiple requests reuse a finite display. This example asks how an order reaches that available flow. A realistic review may need both, with clearly documented interactions and no duplicated trade volume.
For a useful small test, preserve the starting book state, acceptance time, relevant trade events and order modifications. State which records determine aggressor direction and which updates change the queue estimate. Compare a trace against an independently written expected sequence before interpreting aggregate returns. If only coarse data is available, label the queue assumption as an assumption.
Method, evidence and next steps
The published evidence executes original deterministic code for two separate worlds. Independent checks verify forty versus twenty filled units, positive and negative marks, the exact seventy-five-unit queue-clearing boundary, zero quantity and invalid inputs. There is no random sampling, model inference, live account, historical market dataset or upstream engine run.
All prices and quantities in the worked example are invented. The mark is a valuation input, not an execution price obtained by a closing trade. Fees, spread changes, funding, taxes and liquidation are excluded. The results show the consequences of stated queue arithmetic; they do not measure execution quality or establish a trading advantage.
The Trading Tool Lab can help identify which workflows expose these assumptions. DN Research Desk can compare a defined execution question using documented capabilities and reproducible cases. The useful deliverable is a clear account of what the evidence supports: the same signal can acquire different exposure when the assumed queue changes, and that difference can help or hurt.
Download the dated source and scenario record (JSON) · Download the reproducible calculation pack (ZIP).
Frequently asked questions
Are the two orders competing for the same flow?
No. They belong to two separate counterfactual worlds. Each world independently receives the same invented event sequence.
Does reaching the front of the queue guarantee a fill?
No. In this model, only opposing flow remaining after the queue ahead is cleared can fill the order.
Is a better queue position always more profitable?
No. More fills create more exposure. With a lower later mark, the more-filled long position has a larger unrealized loss in this example.
Does the tool estimate real fill probability?
No. It performs deterministic arithmetic on declared inputs and omits hidden liquidity, cancellations, amendments and uncertain arrival time.
Does this article test a NautilusTrader installation?
No. Its software findings come from pinned documentation. The executable example is independently authored and does not run the upstream engine.
Primary sources and evidence
- NautilusTrader trade execution and queue positions. Displayed queue lifecycle, correct-side flow, exact clearing boundary, update behavior and unknown-aggressor limitations. Checked 2026-11-28.
- NautilusTrader fill models. Probabilistic limit-touch eligibility differs from explicit queue-volume tracking. Checked 2026-11-28.
- NautilusTrader version record. The pinned development source identifies v2.0.0rc10. Checked 2026-11-28.
Editorial disclosure: This research explains documented capabilities and original worked examples. Inclusion does not imply endorsement, a commercial relationship or verified trading performance. No placement in this article was purchased.
Corrections and updates: Send source-backed corrections to press@decentralised.news. This 2027 edition was checked on 28 November 2026; documentation, permissions and product availability can change.




