Breakeven Line Indicator for MetaTrader
Breakeven Line Indicator is a MetaTrader indicator that calculates breakeven level based on all open positions and displays it on your chart as a horizontal line. Additionally, it will calculate the total number trades, the total number of lots, and the distance to the breakeven line in points and profit/loss. The indicator is available for both MT4 and MT5.
You can press the
Input parameters
- IgnoreLong (default = false) — if true, the indicator will ignore long positions and will only calculate the breakeven line based on short positions.
- IgnoreShort (default = false) — if true, the indicator will ignore short positions and will only calculate the breakeven line based on long positions.
- line_color_buy (default = clrTeal) — the color for the breakeven line when the total cumulative position is long.
- line_color_sell (default = clrPink) — the color for the breakeven line when the total cumulative position is short.
- line_color_neutral (default = clrSlateGray) — the color for the breakeven line when the total cumulative position is neutral.
- line_style (default = STYLE_SOLID) — the breakeven line style.
- line_width (default = 1) — the breakeven line width.
- font_color (default = clrSlateGray) — text color.
- font_size (default = 12) — text size.
- font_face (default = "Courier") — text font face.
- ObjectPrefix (default = "BEL") — the prefix for chart objects' names. It lets the indicator avoid conflicts with other chart tools.
Why use Breakeven Line Indicator?
When you have multiple trades opened on a single symbol, it can be difficult to tell where your average entry price is and hence where your breakeven point lies. There are many reasons why you might end up with many positions on the same trading instruments: martingale, grid strategies, scaled entries, and so on. Even though we don't recommend any of such trading techniques, it is still a situation many traders often find themselves in. This is where the Breakeven Line Indicator comes handy.
This indicator will calculate the average price of all your positions, it will determine what your net position is, it will calculate how many points the price has to move to reach the breakeven for all your trades, and it will display all this information directly in the main chart window.
You can then use this information to determine optimal exit points or to add further positions to your portfolio.
Example
The example EUR/USD chart below shows the Breakeven Line Indicator running in MetaTrader 5 with two short trades (0.25 and 1 lot) and one long trade (0.5 lot). It calculated the breakeven price on this currently profitable combination of trades to be at 1.08635. The current distance to the breakeven price is 125 points (12.5 pips) or 93.50 USD in profit. The combined position is a short of 0.75 lot and the total number of trades is 3.
Download (ver. 1.00, 2024-03-20)
Breakeven Line Indicator for MetaTrader 4 in .mq4 Breakeven Line Indicator for MetaTrader 4 in .zip Breakeven Line Indicator for MetaTrader 5 in .mq5 Breakeven Line Indicator for MetaTrader 5 in .zip
Discussion
Do you have any suggestions or questions regarding this indicator? You can always discuss Breakeven Line Indicator with the other traders and coders in the forum.
You might be also interested in our breakeven script for MetaTrader. You can use it to automatically set each position's stop-loss to its open price.