Depending on the way the EA operates, you could simply find the stoploss of the most recent open order with the same magic number and ordertype.
Set the new order's stoploss 10 pips above/below it.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Need some help on how to code stop loss on the next order to open.
Exmaple:
Order 1 = Opens with StopLoss of 200 points.
Order 2 = Opens next signal with StopLoss of 10 points below/above Last Open Order StopLoss (Order 1 is still open)
Order 3 = Opens next signal with StopLoss of 10 points below/above Last Open Order StopLoss (Order 1 and 2 are still open)
If no orders are open it will use the default SL of 200 for example.
Another Example:
Order 1 Sell SL: 1.5200
Order 2 Sell SL: 1.5210
Order 3 Sell SL: 1.5220
If someone can give me guidance that would great!