Function getPositionMaxDrawdownPnlCost

  • Returns the PnL cost (in quote currency) at the moment the worst loss price was recorded during this position's life.

    Returns null if no pending signal exists.

    Parameters

    • symbol: string

      Trading pair symbol

    Returns Promise<number>

    Promise resolving to PnL cost or null

    import { getPositionMaxDrawdownPnlCost } from "backtest-kit";

    const cost = await getPositionMaxDrawdownPnlCost("BTCUSDT");
    // e.g. -52 (deepest PnL in quote currency)