The Expert Advisor sets the stop loss/take profit levels that are invisible to the broker's server. The levels are set at a distance of 1 point and more.
The Expert Advisor sets virtual levels of stop loss and take profit, that are displayed as lines on the chart. Your broker does not see the stops and can not remove them. But there is a possibility that with the rapid market there will be a large slippage on position closing.
- OrderToClose - select positions by the type of the trading operation. 1 - any, 2 - Buy, 3 - Sell.
- MagikToClose - the identifier of the positions and/or orders. Usually the position opened by Expert Advisors have unique IDs. To make the EA work only with the positions with the desired ID, specify the value in this parameter. Manually opened positions usually have MagicNumber = 0. A negative value of this parameter will allow the Expert Advisor respond to the positions and orders with any ID.
- SymbolToClose - select positions by the name of the trading instrument. If 1 is set, the Expert Advisor attached to one chart will control all open positions on all trading instruments. If 0 is set, the EA will monitor only the position of the symbol to which chart it is attached. In this case, the EA can be attached to multiple charts of different trading instruments. You can also specify the name of a particular trading instrument, for example, "eurusd". In this case, the Expert Advisor will work with the EURUSD positions only. And it does not depend on the chart, to which the EA is attached.
- TakeProfit - virtual take profit in points. If zero or less is set, the take profit will not be controlled.
- StopLoss - virtual stop loss in points. If zero or less is set, the stop loss will not be controlled.
- EMERGENCYLEVELSET - set an emergency stop loss and take profit for connection failure. This parameter is required for server connection problems and power supply failure. It sets an emergency stop loss and take profit for open positions. Levels are set randomly within a certain range, so that the use of the Expert Advisor is not so visible to your broker.