BuySell Breakeven for Hedge and Basket MT5
- Indicators
- Version: 1.0
- Activations: 10
BuySell Breakeven – know exactly where you get out at zero
When you have several trades open on the same symbol (buys and sells, at different prices, with swap and commission), it is hard to answer a simple question: "If I close everything right now, at what price do I get out even?"
BuySell Breakeven answers it with one clear line on your chart, and lets you see where that line – and your basket TP / SL – would move before you open a new trade.
WHAT IT DOES
- Breakeven line (orange): the price where, if you close all your trades at once, the result is zero – no profit, no loss. Swap, commission, fees and spread are included.
- Works with buys only, sells only, or buys and sells mixed (hedging, averaging, grid baskets).
- The line moves by itself every time you open or close a trade.
- When buys and sells have exactly the same volume, the result no longer depends on the price. The indicator shows "Hedged" and the locked result instead of a line.
- Preview: choose BUY or SELL and a lot size, and see your breakeven NOW and AFTER the trade, plus where your basket TP and SL would land.
- Basket TP / SL in money: lines at the prices where all your trades together win or lose the amount you choose.
- Optional alerts, optional separate Buy / Sell breakeven lines, and values published for other Expert Advisors.
HOW TO READ THE BREAKEVEN LINE
- Price on the profitable side of the line: closing everything now = profit.
- Price exactly on the line: closing everything = zero.
- Price on the other side: closing everything = loss.
- Example: with more buys than sells open, profit is above the line and loss is below it. With more sells than buys, it is the opposite.
1. INFO BAR (top of the chart)
- BUY – total volume of your open buy positions.
- SELL – total volume of your open sell positions.
- BE – the breakeven price (or "Hedged" when buys and sells are balanced).
- P/L – current result of all your trades together, costs included (green in profit, red in loss).
- In the Strategy Tester an extra label "DEMO – sample positions" is shown.
2. PREVIEW PANEL (draggable)
- Title bar – drag it to move the panel anywhere. The panel remembers its position.
- "–" / "+" button – minimizes the panel to a small icon, or opens it again. Minimized, hover the icon to see the preview in a tooltip.
- BUY / SELL – direction of the trade you want to simulate.
- – [lots] + – lot size of the simulated trade. Use the buttons or type a value and press Enter.
- Result card:
- IF YOU BUY / SELL [lots] @ [price]: the trade being simulated and its entry price.
- NOW → AFTER: your breakeven today and where it would move if you opened the trade.
- TP / SL: the prices where your basket profit target and loss limit would be after the trade ("off" when the amount is 0).
- If the trade would leave you fully hedged, AFTER shows "Hedged" and the card shows the locked result.
- PREVIEW ON / OFF – the only switch that turns the simulation on or off. When it is on, a "BE preview" line is drawn on the chart.
- BASKET TARGETS – TP / SL – type an amount in your account currency (for example TP 50, SL 30) and press Enter. 0 = off. Both start at 0.
- TP / SL LINES ON / OFF – shows or hides the TP and SL lines on the chart. It does not turn the targets off: the TP / SL prices in the card and the target alerts keep working.
- The panel position and the lines switch are saved per symbol. TP and SL are kept when you change the timeframe or the inputs, and reset to 0 when you remove the indicator from the chart.
3. LINES ON THE CHART
- Breakeven (orange) – zero point of all your trades.
- BE preview (teal) – breakeven if you open the simulated trade.
- TP (green) / SL (red) – prices where the whole basket wins / loses your chosen amount.
- Buy / Sell breakeven (green / red dashed, optional) – zero point of your buys alone and of your sells alone. Useful for hedgers deciding which side to close.
INPUT PARAMETERS
Calculation
- Magic number – 0 = all positions on the symbol; any other value = only the trades of that Expert Advisor.
- Include commission and fees – include the commission and fees charged by your broker.
- Commission model – "As charged at entry" or "Entry commission x2" for brokers that charge again when the position is closed.
- Include swap – include the accumulated swap.
- Exact close price: include current spread for sells – sells are closed at the Ask price, so the spread is included to give the exact zero point on the Bid price shown on the chart (recommended).
Lines
- Show the net breakeven line – the main orange line.
- Tag above the net line – text shown at the right edge (default "Breakeven"; empty = no tag).
- Show separate Buy / Sell breakeven lines – optional lines for buys alone and sells alone (off by default).
- Show averages without costs – reference lines with the plain average entry price of buys and sells.
- Text shown when buys and sells are balanced – default "Hedged".
Alerts (all off by default)
- Alert when the price crosses the net breakeven.
- Alert when the profit target / loss limit is reached – uses the TP / SL typed in the panel.
- Popup / Push notification / Email – how you want to be notified. Turn on at least one of these together with an alert above.
- Minimum seconds between two alerts – avoids repeated alerts when the price moves around the line.
Preview panel
- Show the preview panel – show or hide the panel.
- Initial lot size / Initial direction – values the panel starts with.
- Panel language – Automatic (terminal language), English, Spanish or Portuguese.
- Panel size in % – 0 = automatic (bigger on high-resolution screens); or a fixed value such as 120.
- First-time distance from the right / bottom edge – where the panel appears the first time.
- Reset the panel to the default position on load – use it if the panel is out of view.
Appearance
- Colors of the breakeven, Buy / Sell, preview, TP and SL lines.
- Width and style of the breakeven, Buy / Sell and average lines.
- Show the info bar / Info bar position / Info bar size in % – position (top center or any corner) and size of the info bar.
- Info bar: breakeven value color and horizontal / vertical offsets.
Data and refresh
- Publish values as terminal global variables – for your own Expert Advisors. Names: BSBE.<symbol>.<magic>.NetBE, .BuyBE, .SellBE, .NetLots, .PL, .Hedged (read them with GlobalVariableGet).
- Refresh interval – background refresh in seconds. The indicator also follows every tick.
COMPATIBILITY
- Forex, metals, indices, crypto and CFDs. Any broker, any timeframe, any account currency.
- Hedging and netting accounts.
- Lightweight: designed not to slow down the terminal.
DEMO
Run the free demo in the Strategy Tester (visual mode). It creates sample positions so you can see every line and the panel working.
NOTE
The indicator does not open, modify or close trades. It shows information to help you make your own decisions.
