I want to buy 3 lots (a, b, c) with 3 different T/Ps but same SLs. How, at the time of initial purchase, do I preset b and c's SLs to move to break even once the price hits a's TP and not continue trailing any higher?

 

You'll have to write Order Managment code to do that.

 
Thanks for your reply, phy.
 
phy:

You'll have to write Order Managment code to do that.

phy, could you give quicky top-level synopsis of what you see needs to be implemented regards this thread and 'Order Management' code.

I'd assume you mean that at each data tick, inspection of orders b,c price relationship with a's TP action (ie, order 'a' is in history pool)

and not continue trailing any higher

this, I read as meaning: order manage b and c's SL to a's TP level (once hit by 'a') and then stop order management, excepting for exit phase of order management

Always a benifit in reading your words phy...

regards

 

I want to buy 3 lots (a, b, c) with 3 different T/Ps but same SLs.

... ok.

How, at the time of initial purchase, do I preset b and c's SLs to move to break even once the price hits a's TP

... You will have to monitor A, monitor price, see if the TP is hit and the trade is closed, then modify the SL on B and C.
There is no "preset" to do that. Trailing stop can be set manually, I don't think an automatic trailing stop can be set
with a command. You will have to watch price (in code) and move the stop loss by OrderModify().

and not continue trailing any higher?

... do nothing after you get the SL set that you desire.

stringo 2006.02.03 16:45
Automatical trailing stops set from expert advisor are impossible.
Use OrderModify function but not frequently. See https://www.mql5.com/en/forum/45157
 

Excellent, thanks for time taken to respond phy.

especially link to 1516. Am glad I asked! got your saveable functional statement and... since code [well, mine does at times:] likes Murphy's Law I'm going to update my list of must do's to ensure no runaway ordersend or ordermodify calls.

have never thought about this issue before and for sure, not want to get zapped by trade server due to too many order...() calls.

Regards