Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Virtual Trailing Stop - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources

author EAcpu | 4 reads | 0 comments |

Virtual Trailing Stop - expert for MetaTrader 5

Idea from : Vladimir Hristov .

MQL5 code by : Balabashka Kong .

Virtual Tracking allows you to set Stop Loss and Take Profit and track positions in a way that the stop orders are not visible to the broker, i.e. they are placed not on your trading center but on your computer; therefore, no one can see your plans except your computer and yourself.

Besides invisibility, there is another very useful thing: many brokers have very wide spreads and levels for placing stop loss orders, so now these levels do not hurt you, the EA just ignores them.

As far as I can tell, everything about stop loss and take profit is clear. I will only describe trailing.

Trailing is managed by three variables:

The virtual stop follows the price a distance equal to the trailing length. Minimum profit is the time to start placing a virtual stop loss. The trailing step is the time interval by which we move the virtual stop.

Suppose we set the values ​​to 5, 2 and 3 respectively.

Once the position profit reaches 7 pips, the virtual stop loss will be moved by 2 pips of the position price [;us minimum profit. Furthermore, when the price moves 3 pips in the direction of profit, the stop loss will move 5 pips to take profit, and so on, following the price a distance of 3 pips. If the price rolls back to the stop loss level, the position will be closed.

Trailing stops appear as dotted lines.

To get to know the EA easier and faster, you can install it in the tester and see how it works in visualization mode:

Virtual Trailing Stop - expert for MetaTrader 5


Attachment download

📎 virtual_trailing_stop.mq5 (26.43 KB)

Source: MQL5 #21362

Verification code Refresh