is there a MT4 function that does this ??

 
No. You should write such function yourself.

Check for OrderStopLoss value and use OrderModify function if needed within order selection loop
 
Slawa,

I have code that does that exactly.

It checks stoploss value every tick, if its not where it should be after x profit pips then it moves the stop loss. But the code is not a trialing stop, it only moves stop loss to breakeven after say 50 pips and thats it.

I wanted to use the manual trailing stop on a order, rather than using code. So will the manual traling stop work even if code is running ???
 
Don't worry. If one of functions (automatical trailing stops or your EA) changes sl then condition for this order changed and its sl will not be changed by another function.

Trailings and EAs processed in separate threads simultaneously
 
So what are you saying ...imagine this list of events

My EA code moves my stop loss to breakeven after 40 pip profit.

As trade wiggles around, I decide to start a manual 30 pip trailing stop loss from the Mt4 menu.

Does the manual traling stop loss work while my EA is still active, Of do I have to turn the EA off first ???
 
2 processes - automatical trailing stops (what is "manual trailing stop loss"?) and EA modifying stop losses - are active and work simultaneously after a tick has income. If one process modifies one order then conditions of this order are changed for another process. However, another process can modify this modified order once more, but it can leave it unmodified. It depends on your algorithm.

If you are not experienced enough, use either Ttrailing Stop or your EA.
 
"manual trailing stop loss" means I guess a "automatical trailing stops" ( as your call it)
I believe it to be a trailing stop started from the TRADE terminal, by selecting the order, and then selecting the trailing stop pip distance. In other words it is set manually by the user and not by EA.
 
FYI see also Alexander's answer in the "TrailingStop vs Ordermodify ( Problem with live acc )"
Reason: