Debugging execution
Trace missing, duplicated, rejected, or unexpected orders through the execution lifecycle.
Find the first stage where the observed result differs from your expectation. Preserve the run, revision, request identifier, instrument, timestamp, source, and relevant logs.
A signal produced no request
Check strategy readiness and state first. The SJS example waits on missing order inspection, invalid snapshots, pending orders, multiple positions, and unexpected short exposure. It consumes blocked crossovers rather than retrying them automatically.
A log of the signal alone does not establish that placeOrder or closePositions was called.
A request was not accepted
Inspect quantity and required fields, warmup, automation mode, L3 decision, placement eligibility, and duplicate-order checks. Keep the method's return contract in mind: a void cancellation result is not interpreted like placement.
If an adapter throws or loses an acknowledgment, reconcile execution state before sending the same instruction again.
An accepted order did not fill
For memory runs, inspect the qualifying quote, close-based threshold, elapsed market-time delay, capital, and trade limits. Confirm a later eligible observation exists. Waiting in wall-clock time does not advance a finished historical replay.
For broker-backed runs, inspect broker/adapter state and errors. Do not apply simulated price checks as an explanation of a broker's actual fill.
Modification or cancellation changed nothing
Confirm the operation is implemented in the selected adapter. In shared simulation, instrument, action, and quantity determine matching; changing quantity in a modification request can prevent it from locating the original order.
Read the resulting order snapshot. A cancellation can race with execution, and cancellation does not remove a position that has already filled.
The position did not close
Check that the request used current position state. Inspect both the close-kind and delegated placement checks, remaining orders, fill delay, and final available observations. A completed backtest can still have an unresolved close attempt.
An oversized opposite-side order does not automatically reverse the shared simulated position. Scale-in and partial-close accounting also have limitations; use a one-entry/full-exit case to isolate basic request behavior.
Unexpected duplicate requests
Inspect repeated timestamps, local asynchronous guards, retry rules, and other order-producing layers. A strategy-local busy flag does not coordinate independent apps or manual actions.
For data-related surprises, return to market-data debugging. For strategy state, use SJS debugging.