Interface PartialEvent

Unified partial profit/loss event data for report generation. Contains all information about profit and loss level milestones.

interface PartialEvent {
    action: "profit" | "loss";
    backtest: boolean;
    currentPrice: number;
    level: PartialLevel;
    note?: string;
    originalPriceOpen?: number;
    originalPriceStopLoss?: number;
    originalPriceTakeProfit?: number;
    partialExecuted?: number;
    pendingAt?: number;
    pnl?: IStrategyPnL;
    position: string;
    priceOpen?: number;
    priceStopLoss?: number;
    priceTakeProfit?: number;
    scheduledAt?: number;
    signalId: string;
    strategyName: string;
    symbol: string;
    timestamp: number;
    totalEntries?: number;
    totalPartials?: number;
}

Properties

action: "profit" | "loss"

Event action type (profit or loss)

backtest: boolean

True if backtest mode, false if live mode

currentPrice: number

Current market price

level: PartialLevel

Profit/loss level reached (10, 20, 30, etc)

note?: string

Human-readable description of signal reason

originalPriceOpen?: number

Original entry price before DCA averaging (present when averageBuy was applied)

originalPriceStopLoss?: number

Original stop loss price set at signal creation

originalPriceTakeProfit?: number

Original take profit price set at signal creation

partialExecuted?: number

Total executed percentage from partial closes

pendingAt?: number

Timestamp when position became active (ms)

Unrealized PNL at the moment this level was reached

position: string

Position type

priceOpen?: number

Entry price for the position

priceStopLoss?: number

Stop loss exit price

priceTakeProfit?: number

Take profit target price

scheduledAt?: number

Timestamp when signal was created/scheduled (ms)

signalId: string

Signal ID

strategyName: string

Strategy name

symbol: string

Trading pair symbol

timestamp: number

Event timestamp in milliseconds

totalEntries?: number

Total number of DCA entries (present when averageBuy was applied)

totalPartials?: number

Total number of partial closes executed (_partial.length)