Function commitSignalNotify

  • Emits a signal.info notification for the currently active pending signal.

    Broadcasts a user-defined informational note without affecting position state. Useful for annotating strategy decisions, triggering external alerts, or logging mid-position events (e.g. RSI crossing a threshold, volume spike detected).

    Automatically reads backtest/live mode from execution context. Automatically reads strategyName, exchangeName, frameName from method context. Automatically fetches current price via getAveragePrice.

    Parameters

    • symbol: string

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

    • Optionalpayload: Partial<SignalNotificationPayload>

      Optional notification fields

      • notificationNote

        Human-readable note. Falls back to signal.note if omitted.

      • notificationId

        Optional correlation ID for external systems (e.g. Telegram message ID).

    Returns Promise<void>

    If called outside an execution context

    If called outside a method context

    If no active pending signal exists for the given symbol

    import { commitSignalNotify } from "backtest-kit";

    // Inside onActivePing callback:
    await commitSignalNotify("BTCUSDT", {
    notificationNote: "RSI crossed 70, consider closing",
    notificationId: "msg-123",
    });