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;
    originalPriceStopLoss?: number;
    originalPriceTakeProfit?: number;
    position: string;
    priceOpen?: number;
    priceStopLoss?: number;
    priceTakeProfit?: number;
    signalId: string;
    strategyName: string;
    symbol: string;
    timestamp: number;
    totalExecuted?: 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

originalPriceStopLoss?: number

Original stop loss price set at signal creation

originalPriceTakeProfit?: number

Original take profit price set at signal creation

position: string

Position type

priceOpen?: number

Entry price for the position

priceStopLoss?: number

Stop loss exit price

priceTakeProfit?: number

Take profit target price

signalId: string

Signal ID

strategyName: string

Strategy name

symbol: string

Trading pair symbol

timestamp: number

Event timestamp in milliseconds

totalExecuted?: number

Total executed percentage from partial closes