Type Alias StrategyData

StrategyData: {
    activatedSignal: IScheduledSignalActivateRow | null;
    cancelledSignal: IScheduledSignalCancelRow | null;
    closedSignal: ISignalCloseRow | null;
    commitQueue: ICommitRow[];
    createdSignal: ISignalDto | null;
    pendingSignalId: string | null;
}

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.

Type declaration

  • activatedSignal: IScheduledSignalActivateRow | null

    Deferred user-initiated scheduled activate (activateScheduled), or null if none pending

  • cancelledSignal: IScheduledSignalCancelRow | null

    Deferred user-initiated scheduled cancel (cancelScheduled), or null if none pending

  • closedSignal: ISignalCloseRow | null

    Deferred user-initiated close (closePending), or null if none pending

  • commitQueue: ICommitRow[]

    Queued commit events (average-buy / partial-* / trailing-* / breakeven) not yet drained

  • createdSignal: ISignalDto | null

    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.

  • pendingSignalId: string | null

    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.