Value returned by tpPriceToPercentShift (or passed to commitTrailingTake)
Original take-profit price from the pending signal
Effective entry price (from getPositionEffectivePrice)
Position direction: "long" or "short"
Absolute take-profit price corresponding to the given percentShift
Convert a percentShift for
commitTrailingTakeback to an absolute take-profit price.Inverse of
tpPriceToPercentShift.newTpDistancePercent = originalTpDistancePercent + percentShift LONG: newTakeProfitPrice = effectivePriceOpen * (1 + newTpDistancePercent / 100) SHORT: newTakeProfitPrice = effectivePriceOpen * (1 - newTpDistancePercent / 100)
Example