One of the most popular ways to protect your trades against losses is to move the stop-loss to a breakeven. In the most basic case, when each trade has its stop-loss set to its open price, this can be easily attained using either a breakeven script or a breakeven EA. However, sometimes you have multiple positions open on the same symbol and want to have a single breakeven level that takes them all into account. That's where the Single Breakeven expert advisor comes handy.
What is Single Breakeven EA?
The Single Breakeven EA for MT4 and MT5 is an expert advisor that analyzes all your open trades for the current symbol (currency pair or any other trading instrument) and calculates a single breakeven price to close all those trades at no loss. It then applies the calculated level to each position's stop-loss or take-profit (depending on their direction and open price).
This expert advisor can also wait for the total profit of all the current chart's trades to reach a certain given value before turning on this collective breakeven.
Also, with this EA, you can set additional profit value, which will be used by the EA to secure some extra profit with the breakeven.
Moreover, the Single Breakeven EA can be configured to take into account the swaps and commission charges associated with the trades to calculate its breakeven level.
This expert advisor constantly monitors and, if necessary, updates your positions as the Bid/Ask price evolves or the pip value changes.
Why use Single Breakeven EA?
Risk management is an important part of trading. One of the ways to manage your risks is to predefine the price points where you positions get closed.
When trading a complex system that requires multiple positions on the same symbol (for example, a grid trading system), it might be helpful to set a single breakeven level after to total profit has reached some predefined value. While it is easy to draw such a level with our Breakeven Line indicator, applying all the correct stop-loss and take-profit values manually might be tedious and suboptimal.
The Single Breakeven EA is the tool that lets you automate the entire process of calculating and setting such collective breakeven exits.
Using the Single Breakeven EA for MetaTrader 4 and 5 provides the following advantages:
- Extensive filters to include only those trades that you want the EA to manage.
- Fully automatic mode.
- Define profit threshold for the breakeven to be applied.
- Notifications when the SL/TP are updated.
- Additional profit value to add to breakeven.
- Add commission and swaps to breakeven.
- Define a delay for order updating to prevent flooding the server.
Input parameters
The Single Breakeven expert advisor supports a range of input parameters to be configured by the trader:
- Total profit in currency to trigger single BE: how many units of currency should the total profit be for the EA to apply breakeven?
- Additional profit in currency for single BE: how many units of currency in profit to add to the collective breakeven price?
- Adjust single BE to which price?: can be one of three options:
- Don't adjust: Buy and Sell trades will be closed at the same single BE price. However, since the Buy trades are closed at Bid while the Sell trades are closed as Ask, they won't close all at the same time.
- Adjust to Ask price: The Buy trades will have the spread value subtracted from their BE price to get closed at the same time as the Sell trades.
- Adjust to Bid price: The Sell trades will have the spread value added to their BE price to get closed at the same time as the Buy trades.
If no adjustment is applied, it may occur so that the Buy trades are closed without the Sell trades closing or vice versa.
- Delay (sec) between adjustments: the number of seconds to wait before applying a recalculated breakeven SL/TP. Used to avoid flooding the trading server with order modification requests.
- Adjust for swaps & commission?: the BE level will be adjusted based on the positions' total swaps and commission.
- Apply to: select which types of orders to apply a breakeven to.
- Filter by magic number: if true, the EA will modify only the orders with a specific magic number.
- Magic number: specify the magic number in case the above is true.
- Filter by comment: if true, the EA will modify only the orders with a specific comment.
- Comment: specify the comment if the above is true.
- Enable Breakeven EA: if true, the EA will start in active mode and will be tracking your trades immediately.
- Enable notifications feature: if true, the EA will send notifications upon setting a breakeven.
- Send alert notifications: if true, the EA will issue native on-screen alerts.
- Send notifications to mobile: if true, the EA will send push-notifications to your mobile device.
- Send notifications via email: if true, the EA will send emails when it updates a stop-loss.
- Show graphical panel: if true, a graphical panel will appear on the chart to control the expert advisor.
Download (ver. 1.00, 2025-06-12)
You can download the expert advisor using the link below and install it by following the presented instructions.
MT4 Single Breakeven EA installation
To install the MT4 version of the EA, please follow the instructions below:
- Download the expert advisor archive file.
- Open the MetaTrader 4 data folder (via File→Open Data Folder).
- Open the MQL4 Folder.
- Copy all the folders from the archive directly to the MQL4 folder.
- Restart MetaTrader 4 or refresh the expert advisors list by right-clicking the Navigator subwindow of the platform and choosing Refresh.
Or you can read a more detailed instruction on how to perform the installation.
Make sure you tick the Allow live trading checkbox on the Common tab when attaching the EA:
You should also tick the Allow automated trading checkbox in the MT4 platform's menu Tools→Options→Expert Advisors. Otherwise, it won't be able to modify orders:
You can open a trading account with any of the MT4 Forex brokers to freely use this expert advisor for MetaTrader 4.
MT5 Single Breakeven EA installation
To install the MT5 version of the EA, please follow the instructions below:
- Download the expert advisor archive file.
- Open the MetaTrader 5 data folder (via File→Open Data Folder).
- Open the MQL5 Folder.
- Copy all the folders from the archive directly to the MQL5 folder.
- Restart MetaTrader 5 or refresh the expert advisors list by right-clicking the Navigator subwindow of the platform and choosing Refresh.
Make sure you enable Allow Algo Trading on the Common tab when attaching the EA:
It is also necessary to tick the Allow algorithmic trading checkbox in the MT5 platform's menu Tools→Options→Expert Advisors:
If you want to use an MT5 version of the EA — Single Breakeven — feel free to look for a broker that offers MetaTrader 5.
Discussion
Do you have any suggestions or questions regarding this expert advisor? You can always discuss Single Breakeven with other traders and coders on our forum.