Function getPositionMaxDrawdownPnlPercentage

  • Returns the PnL percentage 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 percentage or null

    import { getPositionMaxDrawdownPnlPercentage } from "backtest-kit";

    const pnl = await getPositionMaxDrawdownPnlPercentage("BTCUSDT");
    // e.g. -5.2 (deepest PnL percentage reached)