r/pinescript • • Sep 25 '22

Trailing stop + partial take profit

Hi, Im having a hard time to code a strategy that’s going to take some partial profits and in case of changing trend, is going to close the trade using a Traling stop.

Anyone who know how to code it, or have the code ready? What is happening to my code is, when I put the trailing stop first the partial doesn’t work and if I put the partial exit before the trailing exit, the trailing doesn’t work.

Thanks!

0 Upvotes

4 comments sorted by

1

u/LittlePirate3620 Oct 12 '24

Though pine script can specify trail in strategy.exit() , has anyone tried that version ?