Virtual Trailing SL TP MT5
The utility places virtual (hidden from your broker) trailing stop, breakeven, stop loss and take profit.
It is necessary to allow automated trading in the terminal settings.
In testing mode, the utility opens Buy or Sell positions on the first ticks, which allows you to visually observe the given logic, changing the utility parameters. In real mode, the utility does not open positions.
- magic - magic number. If less than 0, positions with any magic number are tracked.
- only_this_symbol - only chart symbol. If false, positions of any symbols are tracked.
- Max_total_open_transactions - maximum number of positions opened simultaneously (the lesser the Max_total_open_transactions value, the less memory is consumed by the utility).
- Slippage - acceptable slippage in points when closing positions (does not work in case of a Market execution).
- Max_Spread_Close_for_BUY - maximum acceptable spread when closing Buy (in points).
- Max_Spread_Close_for_SELL - maximum acceptable spread when closing Sell (in points).
- Close_for_Any_Spread - close positions in case of any spread.
- Take_Profit - take-profit. 0 - disabled.
- Stop_Loss - stop loss. 0 - disabled.
- Breakeven_Start - necessary amount of points from an position Open price for setting a breakeven. 0 - disabled.
- Breakeven_Plus - increase a breakeven by a number of points.
- Trailing_Stop - trailing stop value. 0 - disabled.
- Trailing_Start - necessary amount of points from an position Open price for setting a trailing stop.
- Duration_minutes_after_open - necessary amount of minutes after an position Open price for setting a trailing stop.
- draw marks - draws marks of levels on chart (only for the chart to which the utility is attached).
- open Buy for Tester - open the position of Buy in a Strategy Tester.
- open Sell for Tester - open the position of Sell in a Strategy Tester.
For ease standard points are always indicated in the parameters (by the 4th digit). On five-digit brokers points are recalculated automatically.
Real (standard) trailing stop, breakeven, stop loss and take profit: https://www.mql5.com/en/market/product/44030
Pay attention to the useful information in my profile: https://www.mql5.com/en/users/test-standart