Trailing and SL TP MT5
The utility places 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.
- 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_Step - trailing stop step.
- 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.
- 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.
Virtual (hidden from your broker) trailing stop, breakeven, stop loss and take profit: https://www.mql5.com/en/market/product/44020