Deferred user-initiated scheduled activate (activateScheduled), or null if none pending
Deferred user-initiated scheduled cancel (cancelScheduled), or null if none pending
Deferred user-initiated close (closePending), or null if none pending
Queued commit events (average-buy / partial-* / trailing-* / breakeven) not yet drained
User-supplied signal DTO scheduled to be consumed by the next getSignal tick instead of params.getSignal (set via createPending / createScheduled), or null if none queued. createPending and createScheduled overwrite the same slot, so only the latest wins.
Pause flag: while true nothing new opens — params.getSignal is NOT called and a queued createSignal DTO is NOT consumed (it stays queued and drains after unpause); an existing pending/scheduled signal keeps being monitored and closes normally. Unlike the deferred slots above this flag is NOT tied to any signalId — it is restored unconditionally on waitForInit and survives signal transitions until an explicit setPaused(false).
Id of the pending signal these deferred operations belong to (from _pendingSignal.id), or null if there was no pending signal when the snapshot was written. On restore, the deferred fields are applied only when this matches the restored _pendingSignal.id — otherwise the snapshot belongs to a different/stale position and is discarded.
Number of close-gate attempts STARTED for the current pending signal (pre-armed BEFORE
each gate call — a crash mid-close-attempt still counts it, so after a restart the next
close event carries attempt > 0 and the adapter knows a prior exit order MAY have
reached the exchange). Restored only when the snapshot belongs to the restored pending
signal (pendingSignalId match) or to a deferred user-close drain (closedSignal present),
and CLAMPED to 1 — a stale pre-crash streak must not force-close on the first
post-restart rejection; only the reconcile bit survives.
Reset on a confirmed close and on any pending-signal transition.
Number of gate attempts STARTED for retryOpenSignal's signalId (pre-armed BEFORE each
gate call, so a crash mid-attempt still counts it). The gate event carries
attempt = retryOpenCount - 1; once the started-attempts budget (1 initial + CC retries) is spent, the
retry row is dropped loudly and signal generation resumes. Reset on successful open.
Restored CLAMPED to 1 after a restart: only the attempt >= 1 reconcile bit
survives — a stale pre-crash streak must not burn the fresh retry budget.
Gate-rejected open awaiting an identity-stable retry (CC_ORDER_OPEN_RETRY_ATTEMPTS), or null if none. The row is re-submitted with its ORIGINAL signalId so an idempotent broker adapter (clientOrderId = signalId) reconciles a lost-response fill instead of double-buying. Write-ahead: stays persisted until the open outcome (success / exhaustion / failed re-validation) is durably recorded — a crash right after the broker confirmed the open replays the same id and resolves on the exchange side.
Deferred broker-confirmed stop-loss fill (createStopLoss), or null if none pending. Set when the exchange reports the SL order was actually filled (e.g. by candle high/low), independent of the VWAP-based SL check. Drained on the next tick to close with "stop_loss".
Deferred broker-confirmed take-profit fill (createTakeProfit), or null if none pending. Set when the exchange reports the TP order was actually filled (e.g. by candle high/low), independent of the VWAP-based TP check. Drained on the next tick to close with "take_profit".
Type for persisted deferred strategy state. Snapshot of the in-flight commit queue and deferred user actions that have not yet been forwarded to the broker. Restored on waitForInit after a live crash so the pending broker operations are not silently lost.