Forums ProRealTime English forum ProOrder support Trailing stops remaining static when there are multiple positions Reply To: Trailing stops remaining static when there are multiple positions

#97965

You could code something like this in to your code:

It checks the high at the candle close and if price moved ‘slmove’ pips above your last calculated stop loss price it adjusts your stop loss to be ‘sl’ pips below that high. The opposite for short trades compared to low.

The only downside is that the starting stop loss is calculated off of the close price because we do not know what our TRADEPRICE is at this point so if there is a gap to the next open then your stoploss might not be the desired distance away. I’ll try to code something to at least correct the stop loss distance after one candle.

2 users thanked author for this post.