Function getPositionHighestProfitMinutes

  • Returns the number of minutes elapsed since the highest profit price was recorded.

    Alias for getPositionDrawdownMinutes — measures how long the position has been pulling back from its peak profit level. Zero when called at the exact moment the peak was set.

    Returns null if no pending signal exists.

    Parameters

    • symbol: string

      Trading pair symbol

    Returns Promise<number>

    Promise resolving to minutes since last profit peak or null

    import { getPositionHighestProfitMinutes } from "backtest-kit";

    const minutes = await getPositionHighestProfitMinutes("BTCUSDT");
    // e.g. 30 (30 minutes since the highest profit price)