How to Work with Breakeven: When to Move Your Stop Loss and How to Avoid Being Stopped Out on a Pullback
Hello, friends! Today I would like to talk about a word every trader knows, but one that raises more questions in practice than it seems: breakeven. Moving a stop loss to the entry price sounds simple. But when should you do it, where exactly should the new stop go, and why does a trade sometimes close at zero while the price then travels exactly where you expected? Let's go through it calmlt, step by step, with clear examples.
Over more than 20 years of working with the markets and developing trading robots for MetaTrader 4 and MetaTrader 5, I have seen very different approaches: from "I move the stop as soon as I have two points of profit" to "I never move it, let it stay where it was". Each approach has its advantages and its limitations, and today I will describe them honestly, without big promises.
If you enjoy this kind of breakdown, add me as a friend on MQL5 so you do not miss new publications. Two of my earlier articles go well with this topic: "How to Set Stop Loss and Take Profit Correctly in Trading" and "How Does a Trading Robot Manage a Series of Positions? A Beginner's Guide". The full list of my posts is available in my blog. You can find my trading robots and utilities in my seller section on MQL5, news and educatiinal material in my Telegram channel, and demo versions of my products on the Trading-Go website.
What Is Breakeven in Simple Terms
Breakeven means moving the stop loss of an open position to the entry price, or to a level slightly above the entry price for a buy and slightly below it for a sell. After that, the trade can no longer close at a loss because of price movement: either it keeps developing in your direction, or it closes approximately at zero.
A simple example. You open a buy on EURUSD at 1.1000 with a stop loss at 1.0970, so you risk 30 pips (in my examples I count in pips; for EURUSD that is 0.0001). The price rises to 1.1030. You move the stop from 1.0970 to 1.1000. Now, if the market reverses and reaches the new stop, the position closes near the entry price instead of taking a 30-pip loss.
The word "approximately" is deliberate. Breakeven is almost never exactly zero in money terms, and I will explain why.
Why Breakeven Is Not Exactly Zero: Spread, Commission, Swap and Slippage
The final result of a trade consists of more than the difference between the opening and closing prices. Four components affect it:
- Spread. A buy opens at the Ask price and closes at the Bid price. A sell opens at Bid and closes at Ask. The stop loss of a buy is triggered by the Bid price, while the stop loss of a sell is triggered by the Ask price. This matters for sells: on a chart built from Bid prices, the stop may be triggered before the price line visually reaches its level.
- Commission. Many brokers, especially on ECN accounts, charge a commission per lot. It reduces the result even when the closung price equals the opening price.
- Swap. If a position is held overnight, the broker credits or debits swap. It can be negative or positive, and with many brokers it is charged triple on a particular day of the week, most often Wednesday.
- Slippsge. A stop order is executed at the nearest available price. In a calm market it is almost the same as the stop level, but during news or a gap it can differ noticeably.
That is why, in practice, the stop is moved not exactly to the entry price but with a small buffer that covers the costs. An approximate formula looks like this: buffer in points = (round-turn commission + expected swap in money) ÷ value of one point for your volume + a small margin.
A conditional example. Suppose the broker charges 7 dollars per 1 lot round turn (opening and closing). For EURUSD, one point of a five-digit quote at a volume of 1 lot is worth about 1 dollar, so 7 dollars is roughly 7 points, or 0.7 pips. That means the stop should be placed at least 1 pip above the entry price. These numbers are illustrative: your broker's commission and point value will be different, and you should check them in your account conditions.
One more nuance concerns the account type. In MetaTrader 5 on a netting account, there is a single combined position per symbol, and its entry price is a weighted average. Breakeven is then calculated from that price. On hedging accounts, as well as in MetaTrader 4, each position has its own entry price and its own stop loss.
Why Use Breakeven and What It Does Not Guarantee
The main advantage of breakeven is a clear protection rule. After the stop is moved, you know that price movement can no longer turn a profitable position into a losing one. This helps psychologicalky: it is easier to hold a trade when you do not feel the urge to close it early out of fear of giving back what you have earned. In addition, the rule can be written into a trading plan in advance and applied consistently, which also means it can be tested on history.
Now for the limitations that are mentioned less often. First, moving the stop too early often knocks the position out on an ordinary pullbavk, after which the price continues without you. Second, breakeven does not protect against gaps and strong slippage: a stop is executed at an available price, not at the one you specified. Third, it does not replace a trading strategy, position sizing or control of total risk. Fourth, a series of trades closed at zero produces no result, while time and attention have still been spent.
I have said many times that the main rule of tradung is to let profits run. That is why the combination "breakeven, then trailing stop" often looks more sensible than a rigid take profit that cuts off a good move. But this combination has its own price: some trades will close at breakeven, and some of them will then continue. That is normal, and it is important to accept this in advance rather than try to "beat" it.
When to Move the Stop: Ways to Trigger Breakeven
The central question of breakeven is when exactly to activate it. Below are the main methods used in manual trading and in trading robots.
| Method | How it works | Advantages | Limitations |
|---|---|---|---|
| Fixed distance | The stop is moved when profit reaches a set number of points | Easy to configure and test | Ignores volatility: the same number behaves differently in quiet and active markets |
| Multiple of risk (R) | The move happens when profit equals the stop loss distance (1R) or a part of it | Tied to the risk of the specific trade | With a very short stop it triggers too early, with a long one too late |
| By volatility (ATR) | The distance equals a fraction or multiple of ATR | Adapts to the current market | You need to choose the period and coefficient and test them on history |
| By market structure | The move happens after a new local extreme or the end of a pullback | Based on the logic of price movement | Harder to formalize; in manual trading it becomes subjective |
| After a partial close | Part of the position is closed and the remainder is moved to breakeven | Part of the result is already locked in | A smaller volume remains for further movement |
There is no universal answer: the suitable value depends on the instrument, timeframe, volatility and the strategy itself. That is why I recommend not copying other people's numbers but testing your option on your own history and on a demo account, under conditions as close to real as possible.
Breakeven in Different Trading Styles
Scalping. Stops here are shorr, so the distance to breakeven activation must always be compared with the spread and commission. If that distance is comparable to the costs, the position has almost no room to move, and breakeven turns into a formality.
Intraday trading. Stops are wider, and the key question is how breakeven relates to ordinary pullbacks during the day. If the stop is moved before the market has finished its usual correction, the position is easily knocked out, and this is the most common complaint about breakeven.
Medium-term trading. Here swap and weekend gaps matter more. Breakeven with a buffer for swap looks more logical, but the risk of slippage on a gap remains: the stop will be executed at the first available price after the market opens.
News trading. When news is released, the spread wodens and the price may jump over levels. Breakeven works less predictably in such moments, and this should be built into your calculations in advance.
A Step-by-Step Example: How Breakeven Works on a Trade
Take the same buy on EURUSD. The entry price is 1.1000, the stop loss is 1.0970 (a risk of 30 pips). The breakeven rule: when profit reaches 30 pips, that is, one unit of risk, the stop is moved to 1.1001, which is the entry price plus 1 pip as a buffer for costs. Three scenarios are possibke from here.
- The price keeps rising. The stop sits at 1.1001 and interferes with nothing. The position lives on, and you can add a trailing stop or close the trade according to your plan.
- The price reverses. The market returns to 1.1001 and the stop is triggered. The result is about +1 pip before commission and swap, that is, almost zero instead of a possible 30-pip loss.
- A pullback followed by continued growth. The price pulls back to 1.1001, hits the stop and then still goes up. The trade is closed and the move is missed. This is the most unpleasant but also the most typical price of breakeven.
Which scenario will happen is unknown in advance. Breakeven does not predict the market; it merely turns part of the uncertainty into a clear rule with a clear price. This is an educational example with conditional numbers, not a trading recommendation.
Breakeven and Trailing Stop: Two Different Stages
Beginners often mix up these conceots, although they solve different tasks. Breakeven answers the question "how do I protect the trade from a loss", while a trailing stop answers "how do I avoid giving back the profit I have already accumulated". Breakeven is done once, when the condition is met. A trailing stop moves the stop after the price many times while the position is alive.
Trailing also comes in different forms: with a fixed distance (the stop stays at a set distance from the price), by an indicator (for example, a moving average), or dynamic, where the distance changes as the move develops. The earlier trailing starts, the tighter the protection, but the higher the chance of being stopped out by ordinary noise. The later it starts, the more profit can be given back on a reversal. Again, there is no perfect value, only a compromise that needs to be tested.
Breakeven for a Series of Positions
When several positions are open instead of one, breakeven is calculated for the whole series. For this, the weighted average entry price is used. Example: 0.10 lot bought at 1.1000 and 0.20 lot bought at 1.0950. The average price is (0.10 × 1.1000 + 0.20 × 1.0950) ÷ 0.30 = 1.09667. If the price returns to 1.09667, the whole series will be roughly at zero, again before commission and swap, which must be added.
It is important to remember that adding positions against the price movement increases total exposure and potential drawdown. I wrote about this in more detail in "Why Can Averaging Change the Behavior of a Trading Robot?". The description of my VR Smart Grid robot specifically states that during averaging the breakeven point takes commission and swap into account, so that positions close at zero without hidden losses.
Common Mistakes When Working with Breakeven
- Moving too early. A stop two or three pips from the price on a volatilitu-heavy instrument is very often hit by ordinary market noise.
- A stop exactly at the entry price. Without a buffer for commission and swap, the result will be slightly negative.
- Ignoring the minimum distance. Every symbol has a Stops Level: a stop cannot be placed closer to the current price than this distance. If you try, the server returns an error: in MetaTrader 4 it is error 130 (invalid stops), in MetaTrader 5 it is the code TRADE_RETCODE_INVALID_STOPS. There is also a Freeze Level, near which modifying a position is forbidden.
- Confusion with the Magic Number. A utility or robot with a breakeven function may move the stops of someone else's positions by mistake if it is not limited to its own Magic Number.
- Moving the stop in the wrong direction. Breakeven and trailing should only improve the stop. If the new level is worse than the current one, it must not be changed.
- Spread widening. During news and at rollover the spread can grow, and the stop may be triggered earlier than you expected. This applies to sells too, because their stop is triggered by the Ask price.
- No testing. Settings are chosen "by eye" or copied from someone, without a test on history and on a demo account.
How to Automate Breakeven in MQL5
If you want breakeven to be applied automatically, you can write such a function yourself. Below is an educational example for MetaTrader 5. The function goes through the open positions of the current symbol with the required Magic Number and, if profit has reached the threshold, moves the stop to the entry price with a small buffer. The stop moves only in the direction of improvement, and the minimum distance to the price (Stops Level) is checked.
#include <Trade\Trade.mqh> CTrade trade; input int BE_Trigger = 300; // profit in points that activates breakeven input int BE_Offset = 20; // buffer above the entry price in points input long MagicNumber = 227; // Magic Number of the robot's positions void MoveToBreakeven() { long stopsLevel = SymbolInfoInteger(_Symbol, SYMBOL_TRADE_STOPS_LEVEL); for(int i = PositionsTotal() - 1; i >= 0; i--) { ulong ticket = PositionGetTicket(i); if(ticket == 0) continue; if(PositionGetString(POSITION_SYMBOL) != _Symbol) continue; if(PositionGetInteger(POSITION_MAGIC) != MagicNumber) continue; long type = PositionGetInteger(POSITION_TYPE); double open = PositionGetDouble(POSITION_PRICE_OPEN); double sl = PositionGetDouble(POSITION_SL); double tp = PositionGetDouble(POSITION_TP); double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID); double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK); double newSL; if(type == POSITION_TYPE_BUY) { if(bid - open < BE_Trigger * _Point) continue; newSL = NormalizeDouble(open + BE_Offset * _Point, _Digits); if(sl != 0.0 && sl >= newSL) continue; if(bid - newSL < stopsLevel * _Point) continue; } else { if(open - ask < BE_Trigger * _Point) continue; newSL = NormalizeDouble(open - BE_Offset * _Point, _Digits); if(sl != 0.0 && sl <= newSL) continue; if(newSL - ask < stopsLevel * _Point) continue; } trade.PositionModify(ticket, newSL, tp); } } void OnTick() { MoveToBreakeven(); }
The BE_Trigger parameter is the profit in points at which breakeven is activated, and BE_Offset is the buffer above the entry price in points. The function is called from OnTick. The code is educational: it does not take the freeze level or the specifics of a particular broker into account, so be sure to test it on a demo accoumt. In MetaTrader 4 the principle is the same, but instead of the CTrade class you use the OrderSelect and OrderModify functions, and the key level is called MODE_STOPLEVEL.
How Breakeven Is Implemented in VR Proton
In my VR Proton robot for MetaTrader 4 and MetaTrader 5, breakeven is built in as a separate stage of managing a series of trades. According to the robot's description, after the price has moved a predefined distance in the profitable direction, the position is moved into a protected state. The distance is set by the Break-Even Distance parameter, and an additional step is set by the Break-Even Step parameter. It is this step that lets you place the protection level not exactly at the entry price but with a small margin in the profit zone: above the entry price for a buy and below it for a sell.
It is important that breakeven and trailing in VR Proton are separate stages. First the position is protected, then the stop starts following the price. Trailing offers a classic fixed-distance option, a dynamic mode, the adaptive Dynamic Extra mode and a manual type. You can read more about how the robot is built and how it manages a series of positions in the overview on MQL5.
Now for the limitations. VR Proton works with a series of positions and, when the price moves against the initial direction, it can add positions, that is, use averaging. This increases total volume and potential drawdown, so before using it you should study the description carefully, test the settings on history and on a demo account, and make sure the strategy suits your risk level. The robot is an automation tool, not a guarantee of profit.
The robot's pages on MQL5: VR Proton for MetaTrader 5 and VR Proton for MetaTrader 4. Demo versions and set files are available on the Trading-Go website.
How to Test Breakeven Settings Before Going Live
Before using breakeven with real money, I recommend going through several simple checks:
- Run the same history period in the Strategy Tester twice: with breakeven and without it. Compare not only the final result but also the number of trades, the average win and average loss, and the maximum drawdown.
- Enable realistic conditions in the tester: spread, commission, swap. Without them breakeven looks better than it really is.
- Count separately how many trades closed at breakeven and then saw the price continue in your direction. This figure shows the real price of protection.
- Do not choose values by the maximum profit in the past. A result obtained by overfitting parameters to history often fails to repeat in live trading.
- After the tester, run the strategy on a demo account and compare its behavior with your calculations.
I analyzed in detail why tester and live account results may differ in "Why Does a Trading Robot Make Money in the MetaTrader 5 Strategy Tester but Lose on a Live Account? 7 Reasons Explained", and I covered position size and risk per trade in "How to Calculate Lot Size in MetaTrader 5: Position Sizing, Stop Loss, Risk and MQL5 Examples".
My Recommendations
I recommend treating breakeven as a risk management tool rather than a way to never lose money. It is one of the rules of a trading plan, and it works well only together with the others: a clear stop loss, a sensible volume and a tested strategy.
I have noticed that problems most often arise not from breakeven itself but from the choice of the moment. Beginners move the stop too early, afraid of losing a small profit, and as a result they regularly end up at zero on moves that could have brought a result. And the opposite: some people refuse breakeven altogether and then suffer when a grown position turns into a loss.
In practice it works like this:
- First define the stop loss and the volume based on the acceptable risk per trade. Breakeven works on top of this, not instead of it.
- Choose the activation condition: a fixed distance, a multiple of risk (for example, 1R) or volatility (ATR). Start with the simplest option and test it on history.
- Add a buffer for commission and swap so that closing at breakeven does not leave a hidden minus.
- Decide what happens after breakeven: a trailing stop, a partial close or holding to a pre-planned exit.
- If you use a robot, study how it calculates breakeven for a series of positions and test it under your broker's conditions.
- Keep a jpurnal: note which trades closed at breakeven and what the price did afterwards. After a few dozen trades the picture becomes noticeably clearer, and the decision about settings becomes more informed.
This material is educational and is not individual investment advice. Trading on financial markets involves risk, no method of position management guarantees profit, and past results do not guarantee future ones.
Thank you for reading to the end! Add me as a friend on MQL5, subscribe to my Telegram channel and tell me in the comments how you work with breakeven: with a fixed distance, by ATR or by market structure. We will continue exploring the practice of trade management in upcoming articles.



