It is reply of the developer -
Forum on trading, automated trading systems and testing trading strategies
Trailing stop on virtual server
Slava, 2016.06.28 16:59
No. Trailing stops are not supported by virtual hosting terminal
You can move your stop levels with EA only
Hello all,
When I backtest my MT5 EA with Trailing Stop, it seems to work. However, when deploy the EA in a VPS, the trailing stop didnt work and it alway hit Take Profit or Stop Loss setting.
Anyone has any thoughts on this? I am doing something incorrect?
I use trailing stops all the time and they work.
The EA needs either to tell the server using a TRADE_ACTION_SLTP request or in some instances its easier to do it with a "soft" implementation where an internal representation of the position is compared with the current price and the position closed.
Obviously you can't do anything to manually intercede when it is on a VPS.
Given you say this works in backtest but not on a live system, I would look at the trailing stop logic being used to see if it has a decision making process based on something that is different in back test compared with live - one example is if it uses time, as in backtest all the clocks are the same, but in the live environment the current time, server time and various other times you can access could all be different, and also some of the clocks are only updated on a tick, whilst others are updated based on another source.
You could also run it locally for a while before using VPS to double check it works in real time but hosted on your own PC to see if it working or not working there sheds any more clues.
If you are writing the EA yourself put some debug print statements in too around when it does the soft stoploss processing to make sure it is doing what you think.
Hope that helps,
Steve
I use trailing stops all the time and they work.
If you are writing the EA yourself put some debug print statements in too around when it does the soft stoploss processing to make sure it is doing what you think.
Hope that helps,
Steve
Thank Steve, I guess it is code issue.
Do u know which of the Codebase MT5 Trailing Stop, virtual profit, that is good?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
When I backtest my MT5 EA with Trailing Stop, it seems to work. However, when deploy the EA in a VPS, the trailing stop didnt work and it alway hit Take Profit or Stop Loss setting.
Anyone has any thoughts on this? I am doing something incorrect?