Hedge Closer MT5 Cut Losses in Hedge and Grid
- Utilities
- Version: 1.0
- Activations: 10
Hedge Closer Panel – cut your losses with the profits you already have.
For hedge, DCA and grid traders.
You hedge: you have buys and sells open on the same symbol at the same time. Some are winning, some are losing. Hedge Closer Panel lets you take the profit of the winners and use it to shrink the losers – fully when the money covers the whole loss, partially when it doesn't – without your realized balance ever going below zero.
This is a MANUAL tool, not a trading robot. It never opens trades and never closes anything on its own. Nothing happens until you tick the positions and click "Close selected".
How it works
- Attach it to the chart of the symbol you trade. The panel lists every open position of that symbol: winners in green, losers in red.
- Tick the winner(s) and the loser(s) you want to work with.
- Before you click, the action box shows exactly what will happen and the realized balance you will end up with.
- Click "Close selected". The winners are closed in full; their profit, plus the balance you already collected, pays for closing the losers.
- Whatever is left over stays in the "Realized net balance" for the next time.
Also for DCA (Dollar Cost Averaging) and grid traders - The panel does not care whether your positions are buys against sells or several buys (or sells) on the same side: it lists every position of the symbol and applies the same rule. If you average down, tick your best entry (in profit) and your worst entry (the one losing the most): the profit shrinks the worst one, fully or partially, without the balance going below zero. It is the same "overlap" idea many grid EAs use to cut drawdown, done by hand and with the result shown before you click.
- Heads-up (average price) - closing your best-priced entry raises the average price of what stays open. Example with four XAUUSD buys at 2000, 1990, 1980 and 1970: the average goes from 1985.00 to 1988.46, while the open volume drops from 0.20 to 0.13 lots and the worst entry gets smaller. It is a risk-management decision, not a free improvement.
- Why do it - less exposure. In the example the open volume drops 35% (0.20 → 0.13 lots), so less margin is used and every further drop costs less. That free margin leaves room to re-enter lower if your plan calls for it: buying 0.07 lots at 1960 brings you back to 0.20 lots with an average of 1978.50 instead of 1985.00. This only helps if price keeps falling – if it rebounds instead, you recover less. The panel never opens trades: the re-entry is your decision.
- Trades opened by an EA - the panel sees them too, but closing them by hand may change how that EA manages its grid. Check how your EA reacts before using both together.
The rule that protects you: never below zero
- A loser is closed in full only if the realized balance plus the winners ticked in that same click cover its whole loss.
- If that is not enough, only the part of the loser the balance can pay for is closed. Example: balance 21.00, loser of 0.10 lots losing 40.00 → 0.05 lots are closed, 0.05 lots stay open and 1.00 of balance is left.
- If the money is not enough even for the minimum lot of the symbol, nothing is closed – not even the winner. You never spend a profit without reducing a loss.
- A 2% safety margin and rounding down to the symbol's lot step absorb price movement during execution, so the balance ends slightly above zero rather than exactly at zero.
- A negative balance (for example one you set by hand) is treated as zero: it never pays for anything.
See the result before you click - The action box applies the same rules as the real close, so what you see is what the button does:
- Green (full) - everything you ticked will be closed.
- Amber (partial) - only part of it will be closed. The box tells you how many positions close in full, which one closes partially and with what volume, and how many stay untouched.
- Red (no funds) - not even the minimum lot can be paid for. It shows how much balance is missing, and the button is disabled.
Exact accounting, any broker
- Every result is read from the deal in your account history: profit, swap, commission and fees, including the proportional entry commission of the volume closed. No estimates based on tick value.
- Works with any symbol and lot step: forex, gold, indices, crypto, CFDs.
- The realized net balance is saved per account and symbol, and survives restarts and timeframe changes. You can set it to any value or reset it from the foldable "Adjust balance" section.
Panel
- Draggable and minimizable to a small icon; hover the icon to see positions, floating P/L and balance.
- Always stays inside the visible chart area and adapts to high-DPI screens.
- Click anywhere on a row to tick or untick it.
- One panel per chart: each instance only sees and closes the positions of its own symbol.
- Available in English, Español, Português, Français, Deutsch, Italiano, Русский, 中文, 日本語, Türkçe and 한국어.
Installation (it is an Expert Advisor)
- Type - Hedge Closer Panel is listed under Utilities but installs as an Expert Advisor, not as an indicator. After purchase you will find it in the Navigator under "Expert Advisors" → "Market".
- How to start - drag it onto the chart of the symbol you want to manage and tick "Allow Algo Trading" in the "Common" tab.
- Already using another EA? - MT5 allows only one Expert Advisor per chart. If an EA (for example a grid EA) is already running on that chart, open a second chart of the same symbol and attach the panel there. Both work at the same time.
Requirements
- A hedging account (several positions on the same symbol). On netting accounts there is only one position per symbol, so there is nothing to offset.
- "Algo Trading" enabled in the terminal (needed to close positions).
Try it in the Strategy Tester - The free demo runs in the Strategy Tester. There, and only there, the panel opens a few sample buys and sells so you have winners and losers to play with. Run it in visual mode, tick a winner and a loser, and click "Close selected". On a live chart the panel never opens a trade.
Inputs
- Panel language - language of the panel.
- Symbol to control - leave empty to use the chart's symbol.
- Backup refresh rate (ms) - the panel also refreshes on every tick.
- Initial position X / Y - starting position; drag the panel afterwards and it remembers where you leave it.
- Maximum number of positions listed - how many positions the panel shows (15 by default).
- Background, accent and text colors - customize the look of the panel; the other tones are generated from the background color.
- Hide MT5 trade levels - hides the native entry/SL/TP lines on the whole chart (off by default).
- Max slippage (points) - slippage allowed when closing.
Important - Hedge Closer Panel does not predict the market and does not make decisions for you. It carries out, precisely and safely, the closing decision you make. Trading involves risk.

