Function commitClosePending

  • Closes the pending signal without stopping the strategy.

    Clears the pending signal (active position). Does NOT affect scheduled signals or strategy operation. Does NOT set stop flag - strategy can continue generating new signals.

    Automatically detects backtest/live mode from execution context.

    Parameters

    • symbol: string

      Trading pair symbol

    • Optionalpayload: Partial<CommitPayload>

      Optional commit payload with id and note

    Returns Promise<void>

    Promise that resolves when pending signal is closed

    import { commitClosePending } from "backtest-kit";

    // Close pending signal with custom ID
    await commitClosePending("BTCUSDT", { id: "manual-close-001" });