Interface SignalOpenContract

Signal open sync event.

Emitted when a scheduled (limit order) signal is activated — i.e., the exchange allowed the framework to enter the position by filling the limit order at priceOpen.

In backtest mode: fired when candle.low <= priceOpen (long) or candle.high >= priceOpen (short). In live mode: fired when the exchange confirms the limit order is filled.

Consumers use this event to synchronize external order management systems (e.g., confirm that a limit buy/sell was executed on the exchange).

Consumers:

  • External order sync services
  • Audit/logging pipelines
interface SignalOpenContract {
    action: "signal-open";
    backtest: boolean;
    cost: number;
    currentPrice: number;
    exchangeName: string;
    frameName: string;
    originalPriceOpen: number;
    originalPriceStopLoss: number;
    originalPriceTakeProfit: number;
    pendingAt: number;
    pnl: IStrategyPnL;
    position: "long" | "short";
    priceOpen: number;
    priceStopLoss: number;
    priceTakeProfit: number;
    scheduledAt: number;
    signal: IPublicSignalRow;
    signalId: string;
    strategyName: string;
    symbol: string;
    timestamp: number;
    totalEntries: number;
    totalPartials: number;
}

Hierarchy

  • SignalSyncBase
    • SignalOpenContract

Properties

action: "signal-open"

Discriminator for signal-open action

backtest: boolean

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

cost: number

Cost of the position at close (sum of all entry costs)

currentPrice: number

Market price at the moment of activation (VWAP or candle average)

exchangeName: string

Exchange name where signal was executed

frameName: string

Timeframe name (used in backtest mode, empty string in live mode)

originalPriceOpen: number

Original entry price before any DCA averaging (initial priceOpen)

originalPriceStopLoss: number

Original stop loss price before any trailing adjustments

originalPriceTakeProfit: number

Original take profit price before any trailing adjustments

pendingAt: number

Position activation timestamp in milliseconds (set at this event)

Total PNL of the closed position (including all entries and partials)

position: "long" | "short"

Trade direction: "long" (buy) or "short" (sell)

priceOpen: number

Entry price at which the limit order was filled

priceStopLoss: number

Effective stop loss price at activation

priceTakeProfit: number

Effective take profit price at activation

scheduledAt: number

Signal creation timestamp in milliseconds (when scheduled signal was first created)

Complete public signal row at the moment of this event

signalId: string

Unique signal identifier (UUID v4)

strategyName: string

Strategy name that generated this signal

symbol: string

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

timestamp: number

Timestamp from execution context (tick's when or backtest candle timestamp)

totalEntries: number

Total number of DCA entries at the time of close (_entry.length). 1 = no averaging done (only initial entry). 2+ = averaged positions.

totalPartials: number

Total number of partial closes executed at the time of close (_partial.length). 0 = no partial closes done. 1+ = partial closes executed.