Posts: 1,036 since May 2012
Thanks Given: 1,244
Thanks Received: 1,326
|
Hi All,
Im trying to figure out how to code taking profit on half my position but am not having much luck.
Essentially what I want is to have an initial hard stop on my whole position. Then when my profit target is reached, take profit on 50% of my position. Then implement a trailing stop on the remainding half of my position.
Also, what if my strategy is running on bar close. How would I go about changing my stops as per above if I dont want to wait till the close of the bar. ie: My entries work on bar close, but I need my stops to be managed 'live'. Is that possible?
Could someone please offer some advice or point me in the right direction.
Thanks.
|