Virtual Trailing Stop - MetaTrader 4 Expert | MT4 EA Download - MetaTrader 4 Resources

Virtual Trailing Stops can set stop losses, take profits and trailing orders in a way that is invisible to the broker, i.e. they are not placed in the trading center but on your computer and no one can see your plans except you and your computer.
In addition to invisibility, there is another useful thing: many brokers have very wide spreads and levels for setting stop losses, so now these levels cannot hurt you, experts just ignore them.

I think stop loss and take profit are all clear. Only trailing stops will be described.
Trailing stop is controlled by three variables:
The virtual stop follows the price movement by the length of the trailing stop. Minimum profit - when setting a virtual stop loss. The trailing stop step size - when the virtual stop is moved.
Set the values of 5, 2 and 3 respectively.
Once the order profit reaches 7 pips, the virtual stop is moved to the order opening price plus 2 pips of the minimum profit. Next, if the price moves 3 pips in the direction of profit, the stop loss will move to 5 pips in profit, and so on, following the price by 5 pips. If the price falls back to the stop loss level, the order will be closed.
Trailing stops appear as dotted lines.
There are further development plans to add the ability to manually move the line so that stopping points can be corrected during operation. There are also plans to add support for order quantities. Currently, Trailing Stop only works properly with 1 order per side. But despite this, a trailing stop will not close a losing position even if there are multiple orders in each direction.
In order to better understand the Expert Advisor, you can place it in the strategy tester and use the visualization mode to see it in action.
Attachment download
📎 virtual_trailing_stop.mq4 (4.83 KB)
Source: MQL5 #13853
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •