declare function trailingTake(symbol: string, percentShift: number, currentPrice: number): Promise<boolean>;
Adjusts the trailing take-profit distance for an active pending signal.
CRITICAL: Always calculates from ORIGINAL TP, not from current trailing TP. This prevents error accumulation on repeated calls. Larger percentShift ABSORBS smaller one (updates only towards more conservative TP).
Updates the take-profit distance by a percentage adjustment relative to the ORIGINAL TP distance. Negative percentShift brings TP closer to entry (more conservative). Positive percentShift moves TP further from entry (more aggressive).
Absorption behavior:
Automatically detects backtest/live mode from execution context.
| Parameter | Description |
|---|---|
symbol |
Trading pair symbol |
percentShift |
Percentage adjustment to ORIGINAL TP distance (-100 to 100) |
currentPrice |
Current market price to check for intrusion |