Managing open orders in MQL5 - page 2

 
gtyrozz:

Hi guys,


Old post, but let me come back to it. As I do not see answer to the query.

I have two deals opened for buy lets call them deal #1 and deal #2. I understand it just one position.

I want deal #1 to have SL on X price and deal #2 on Y price.

Then in tester I will see, two nice "buy" lines closed on different prices.

What would be the way to modify SL of certain deal, according to market moves?

If you need reasons why (well you shouldn't need taht to answer above but anyway) let say my strategy says buy 2x and as market goes up move #1 SL 100 points up and #2 SL 50 points up. 

Please read the topic and the links provided again. You don't understand what is a deal.

An SL can only be attached to a position, this has nothing to do with a deal.

This topic was done when there was no hedging account with MT5. What you need for your purpose is an hedging account (aka. MT4) and 2 positions.
Reason: