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