Interface TickEvent

Unified tick event data for report generation. Contains all information about a tick event regardless of action type.

interface TickEvent {
    action: "active" | "closed" | "idle" | "opened";
    closeReason?: string;
    currentPrice: number;
    duration?: number;
    note?: string;
    originalPriceStopLoss?: number;
    originalPriceTakeProfit?: number;
    percentSl?: number;
    percentTp?: number;
    pnl?: number;
    position?: string;
    priceOpen?: number;
    priceStopLoss?: number;
    priceTakeProfit?: number;
    signalId?: string;
    symbol?: string;
    timestamp: number;
    totalExecuted?: number;
}

Properties

action: "active" | "closed" | "idle" | "opened"

Event action type

closeReason?: string

Close reason (only for closed)

currentPrice: number

Current price

duration?: number

Duration in minutes (only for closed)

note?: string

Signal note (only for opened/active/closed)

originalPriceStopLoss?: number

Original stop loss price before modifications (only for opened/active/closed)

originalPriceTakeProfit?: number

Original take profit price before modifications (only for opened/active/closed)

percentSl?: number

Percentage progress towards stop loss (only for active)

percentTp?: number

Percentage progress towards take profit (only for active)

pnl?: number

PNL percentage (for active: unrealized, for closed: realized)

position?: string

Position type (only for opened/active/closed)

priceOpen?: number

Open price (only for opened/active/closed)

priceStopLoss?: number

Stop loss price (only for opened/active/closed)

priceTakeProfit?: number

Take profit price (only for opened/active/closed)

signalId?: string

Signal ID (only for opened/active/closed)

symbol?: string

Trading pair symbol (only for non-idle events)

timestamp: number

Event timestamp in milliseconds (pendingAt for opened/closed events)

totalExecuted?: number

Total executed percentage from partial closes (only for opened/active/closed)