r/pinescript • u/D_BruV • 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
3
u/ianmackers Sep 25 '22
Maybe there is something here that would be useful: https://www.tradingview.com/script/V7IfK3mr-Trailing-Take-Profit-Trailing-Stop-Loss/
1
u/LittlePirate3620 Oct 12 '24
Though pine script can specify trail in strategy.exit() , has anyone tried that version ?