Login / Register
Add a review
Log in
Sign UP
Interactive Stop Loss


The expert Advisor allows the trader to set a stop loss that is invisible to unscrupulous brokers, thereby preventing false breakouts and unwanted triggering of the stop loss. If you use a standard stop loss, then very often the price, before going towards an open order, manages to break through the stop loss and the order is closed. Interactive Stop Loss removes the standard stop loss of an open order and adds a horizontal line instead, after which it accompanies the order until it is completely crossed by the price and only then closes the order. The order is closed only after the candle closes behind the stop loss line, and not after a short touch, as is the case with a standard stop loss.

The expert Advisor can work on all trading instruments at once, as well as on the current chart instrument on which it was thrown. The expert Advisor can also work with orders based on a magic identifier (for example, with orders from another expert Advisor) or on all orders, regardless of the magic identifier.


  • symbol – symbols used by the expert Advisor. Values: CURRENT – current chart symbol, ALL-all terminal symbols.
  • MAGIC – the magic number of orders that the expert Advisor works on. Value -1 – orders with any magic number.
  • slippage – allowed slippage for closing orders;
  • interactive-enables interactive stop loss mode.
  • close_mode – mode for closing orders based on an interactive stop loss. Values: CLOSE-the EA closes the order after the candle closes behind the interactive stop loss line, CROSS-orders are closed immediately after the price crosses the interactive stop loss line.
  • sl_name_begin – prefix for automatic naming of the lines is an interactive stop-loss.
  • sl_line_color – color lines is an interactive stop-loss.
  • x_btn and y_btn – the distance of the upper-right corner of the button panel from the beginning of the chart in x and y, respectively.
  • alert – enable / disable alerts.

[spoiler title=”

How to trade

After adding the expert Advisor to the chart, it will remove the stop-losses of all orders and add horizontal lines instead, along which it will continue to accompany transactions. If you need to return orders to their original state, then press the “Interactive” button at the top of the chart and the EA will return all stop losses to their original state. If you do not need an interactive stop loss when adding an expert Advisor to the chart, then you should set the interactive parameter to false. After enabling the “Interactive” mode, the dealing center does not know anything about your stop losses and therefore the possibility of manipulation on its part is excluded.

After enabling Interactive mode, the “Set SL” button appears to the right of the “Interactive” button, by clicking on which you can add stop losses unnoticed by the broker (see the illustrations).

By default, the EA closes orders only after the candle crosses and closes behind the interactive stop loss line. However, if you want to keep the standard stop loss behavior, while hiding your stop losses from the broker, then you should change the close_mode parameter from the CLOSE value to the CROSSvalue .


In order for the trader to know about the order closing in time, the expert Advisor provides alerts accompanied by a sound signal. The alert reports the type of closed order, its ticket, closing price, and profit. If the trader mistakenly drags the stop loss line to an invalid level, the EA will correct it and issue an alert with a warning. If you don’t need alerts, you can disable them in the settings by changing the alert parameter to false.

The language of the expert Advisor’s allerts corresponds to the language settings of the terminal. Russian Russian alerts are displayed in Russian, and English and other languages are displayed in English.


To test the expert Advisor on history using the expert Advisor tester or on a demo account, I recommend downloading the trial version: https://www.mql5.com/ru/market/product/9381.


Add review
Reviews ( 0 ):