TWS API: Trailing Stop
TWS API: Trailing Stop
Trail Offset. Required.
One of the following class attributes must be supplied with the order ticket.
- Absolute Offset:
Order.auxPrice - Relative Offset:
Order.trailingPercent
Note that the value assigned totrailingPercentwill be interpreted as a true percent, e.g.,trailingPercent = 0.50becomes 0.50% = 0.0050.
Stop Price: Order.trailStopPrice
In the example to the right, we have outlined two Trailing Stop orders with explicit Stop Prices via order.trailStopPrice.
In the first order, we supply a relative offset of 2% using order.TrailStopPercent.
In the second order, we supply an absolute offset of 3 units of currency using order.auxPrice.

