Interface IStrategyTickResultClosed

Tick result: signal closed with PNL. Final state with close reason and profit/loss calculation.

interface IStrategyTickResultClosed {
    action: "closed";
    backtest: boolean;
    closeId?: string;
    closeReason: StrategyCloseReason;
    closeTimestamp: number;
    createdAt: number;
    currentPrice: number;
    exchangeName: string;
    frameName: string;
    pnl: IStrategyPnL;
    signal: IPublicSignalRow;
    strategyName: string;
    symbol: string;
}

Properties

action: "closed"

Discriminator for type-safe union

backtest: boolean

Whether this event is from backtest mode (true) or live mode (false)

closeId?: string

Close ID (only for user-initiated closes with reason "closed")

closeReason: StrategyCloseReason

Why signal closed (time_expired | take_profit | stop_loss | closed)

closeTimestamp: number

Unix timestamp in milliseconds when signal closed

createdAt: number

Unix timestamp in milliseconds when this tick result was created (from candle timestamp in backtest or execution context when in live)

currentPrice: number

Final VWAP price at close

exchangeName: string

Exchange name for tracking

frameName: string

Time frame name for tracking (e.g., "1m", "5m")

Profit/loss calculation with fees and slippage

Completed signal with original parameters

strategyName: string

Strategy name for tracking

symbol: string

Trading pair symbol (e.g., "BTCUSDT")