Function commitTrailingTakeCost

  • Adjusts the trailing take-profit to an absolute price level.

    Convenience wrapper around commitTrailingTake that converts an absolute take-profit price to a percentShift relative to the ORIGINAL TP distance.

    Automatically detects backtest/live mode from execution context. Automatically fetches current price via getAveragePrice.

    Parameters

    • symbol: string

      Trading pair symbol

    • newTakeProfitPrice: number

      Desired absolute take-profit price

    Returns Promise<boolean>

    Promise - true if trailing TP was set/updated, false if rejected