Trailing Stops on Mt trail your stop by a fixed amount of points (0.1 pip). Also, the trailing stop will only activate after it has moved in your favor by the number of points set for the trailing stop. Essentially once the trailing stop is activated it will be at break even.
For example, setting a trailing stop for 500 points (50 pips) would mean that the trade would need to move 50 pips in my favor before the trailing stop is activated. Then, after the trailing stop is activated, the stop will move 50 pips for every 50 pips the trade moves in my favor.
Finally, it is important to note that the platform must remain on at all times in order for the trailing stop function to work on MT platform.
Programming in MT5:
If position has Stop Loss price, it checks the minimal allowed Stop Loss distance to the current price. If its value is lower than the Stop Loss level, it suggests to set a new Stop Loss price. For this case if position has Take Profit price, it suggests to set new Take Profit price.
Ref:
1. http://wiki.mbalib.com/wiki/%E7%A7%BB%E5%8A%A8%E6%AD%A2%E6%8D%9F