--- In twsapi@y..., tripack44 <no_reply@y...> wrote:
Trailing stops take a bit of proper organization to work out
correctly. You need to keep track of entry price, whether it is a
buy
or sell, MaxPnL for the open position and the Trail Stop amount.
You
use live data to figure the MaxPnL. For a long position the Trail
stop price = Entry Price - MaxPnL.
Actually the formula if you are in a long position for setting your
trailing stop would be Stop Price = Entry Price + MaxPnL - Trail Stop
Amount