Hi everyone,
I’d like to keep my SL constant equal to (for Long)
SL=TRADEPRICE-Low[1]
The problem in writing TRADEPRICE-Low[1] is that Low[1] keeps changing at each bar.
Once executing a trade, how can I keep this value constant until exiting the trade?
Thanks
First set SL to ZERO when Not OnMarket, then use your expression only when SL=0. So it will not change next bar:
If Not OnMarket then
SL = 0
Endif
.
.
If OnMarket and SL = 0 then
SL=TRADEPRICE-Low[1]
Endif