Returns the distance in PnL percentage between the current price and the highest profit peak.
Computed as: max(0, peakPnlPercentage - currentPnlPercentage). Returns null if no pending signal exists.
Trading pair symbol
Promise resolving to drawdown distance in PnL% (≥ 0) or null
import { getPositionHighestProfitDistancePnlPercentage } from "backtest-kit";const dist = await getPositionHighestProfitDistancePnlPercentage("BTCUSDT");// e.g. 1.5 (gave back 1.5% from peak) Copy
import { getPositionHighestProfitDistancePnlPercentage } from "backtest-kit";const dist = await getPositionHighestProfitDistancePnlPercentage("BTCUSDT");// e.g. 1.5 (gave back 1.5% from peak)
Returns the distance in PnL percentage between the current price and the highest profit peak.
Computed as: max(0, peakPnlPercentage - currentPnlPercentage). Returns null if no pending signal exists.