开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: Modifying an order & testing


tripack44
 

--- 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

Join [email protected] to automatically receive all group messages.