Returns the percentage of the position currently held (not yet closed by partials). 100 = nothing has been closed (full position), 0 = fully closed. Correctly accounts for DCA entries between partial closes.
Correctly-named alias for getTotalPercentClosed.
Trading pair symbol
Promise - held percentage (0–100)
import { getTotalPercentHeld } from "backtest-kit";const heldPct = await getTotalPercentHeld("BTCUSDT");console.log(`Holding ${heldPct}% of position`); Copy
import { getTotalPercentHeld } from "backtest-kit";const heldPct = await getTotalPercentHeld("BTCUSDT");console.log(`Holding ${heldPct}% of position`);
Returns the percentage of the position currently held (not yet closed by partials). 100 = nothing has been closed (full position), 0 = fully closed. Correctly accounts for DCA entries between partial closes.
Correctly-named alias for getTotalPercentClosed.