Interface SignalPingContract

Signal pending-ping sync event.

Emitted on every live tick while a pending signal (open position) is being monitored, BEFORE the framework evaluates TP/SL/time completion. It asks the external order management system whether the corresponding order is STILL pending (open) on the exchange.

Listener contract (mirrors syncSubject semantics):

  • Return true (or do nothing) — the order is still open on the exchange, keep monitoring.
  • Return false OR throw — the order is no longer open on the exchange (filled, cancelled, liquidated externally). The framework closes the pending signal with closeReason "closed".

Backtest never emits this event — there is no live exchange to query.

Consumers:

  • Broker adapter via onOrderCheck (syncPendingSubject subscription)
  • Registered actions via orderCheck / onOrderCheck
interface SignalPingContract {
    action: "signal-ping";
    backtest: boolean;
    currentPrice: number;
    exchangeName: string;
    frameName: string;
    maxDrawdown: IStrategyPnL;
    originalPriceOpen: number;
    originalPriceStopLoss: number;
    originalPriceTakeProfit: number;
    peakProfit: IStrategyPnL;
    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;
}

Properties

action: "signal-ping"

Discriminator for pending-ping action

backtest: boolean

Whether this event is from backtest mode (true) or live mode (false) — always false in practice

currentPrice: number

Market price at the moment of the ping (VWAP)

exchangeName: string

Exchange name where signal was executed

frameName: string

Timeframe name (empty string in live mode)

maxDrawdown: IStrategyPnL

Maximum drawdown experienced during the life of this position up to this event

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

peakProfit: IStrategyPnL

Peak profit achieved during the life of this position up to this event

pendingAt: number

Position activation timestamp in milliseconds

Unrealized PNL of the open position at the moment of the ping

position: "long" | "short"

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

priceOpen: number

Effective entry price (may differ from priceOpen after DCA averaging)

priceStopLoss: number

Effective stop loss price (may differ from original after trailing)

priceTakeProfit: number

Effective take profit price (may differ from original after trailing)

scheduledAt: number

Signal creation timestamp in milliseconds

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)

totalEntries: number

Total number of DCA entries (_entry.length). 1 = no averaging done.

totalPartials: number

Total number of partial closes executed (_partial.length). 0 = none.