Hedge and Position Commander
- Утилиты
-
AL MOOSAWI ABDULLAH JAFFER BAQER
To trade successfully we need to go through the proven path that others had gone and reached!
Here are 17 quotes from such successful investors:
1- Limit your size in any position so that fear does not become the prevailing instinct guiding your judgment.
Joe Vidich - Версия: 4.10
- Обновлено: 28 октября 2026
- Активации: 5
ONE PANEL. EVERY POSITION. FULL CONTROL IN ONE CLICK.
When the market turns against a busy account, you do not want to hunt through the Trade tab. Hedge & Position Commander puts your whole book on one calm card and gives you the buttons that matter: lock the exposure, strip a stop or a target, bank the winners or cut the losers, for the whole account, one symbol or the chart symbol.
Try it first, free of risk: run it in the MetaTrader 5 Strategy Tester in visual mode. In the tester it opens two or three small demo positions on its own, so you can press every button and watch the panel react before you ever attach it to a live chart.
In five lines
- Live account, chart-symbol and selected-symbol statistics: orders, profit, lots, swaps, wins and losses.
- One-click hedge of the net exposure for all symbols, a selected symbol or the chart symbol.
- Remove all take profits or stop losses, close all winners or all losers, in three scopes.
- Optional auto-hedge when account drawdown reaches your chosen percentage.
- New: a break-even row showing where the net position of the chart symbol returns to zero.
Why traders keep it on the chart
Most trouble on a trading account does not come from one bad entry. It comes from the minutes after, when several positions on several symbols move at once and every manual action takes too long. This utility was built for those minutes. It reads every open position, groups the numbers the way a trader thinks about them and turns the most common emergency actions into a single, confirmed click.
What is new in this version
- A new card-style panel in deep ink and amber, the same family as our latest tools. It sits on the left, measures its own text and shrinks its font on small screens, so the right side of the chart and the price scale always stay free.
- Safer trading code: every hedge order now checks that trading is allowed, checks the required margin first, respects the broker minimum, maximum and lot step, and reports the broker answer instead of failing silently.
- Stop and target removal and closing now respect the broker freeze level, and every rejected request is reported in the Experts log.
- Hedge All now covers every symbol that has an open position, including symbols that are not in Market Watch.
- The auto-hedge switch is remembered per account, symbol and magic number, so a timeframe change or a restart does not silently switch it off.
- Kaizen addition: a break-even row for the chart symbol with the distance from the current price in points.
What the panel shows
The header shows the chart symbol, the account type (hedging or netting) and the magic number used for the utility's own hedge orders, plus an AUTO ON / AUTO OFF pill. Below it are three blocks of real data:
- Account: number of buy, sell and total orders; profit including swap for buys, sells and total; lots; swaps; the sum of all winning and all losing positions; and current drawdown next to your auto-hedge trigger.
- Chart: the same figures for the symbol of the chart, plus the net break-even price and how many points away it is.
- Selected: the same figures for any symbol you pick with the PREV and NEXT buttons.
Profit rows turn green or red with the result, and the drawdown row turns amber once drawdown reaches half of your trigger, so you see trouble coming before it arrives.
The buttons
- Hedge All / Selected / Current: opens one opposite market order that brings the net lots of that symbol to zero. Needs a hedging account.
- No TP All / Selected / Current: removes take profit from the matching positions and keeps their stop loss.
- No SL All / Selected / Current: removes stop loss from the matching positions and keeps their take profit.
- Close Win All / Selected / Current: closes every matching position that is in profit.
- Close Loss All / Selected / Current: closes every matching position that is in loss.
- PREV / NEXT: steps through the Market Watch symbols (minus your filter) to choose the selected symbol.
- AUTO-HEDGE: switches automatic hedging on or off.
- REFRESH: recalculates all figures at once.
Every action asks for confirmation on a live chart, so a slip of the mouse never closes a position.
How to use it, step by step
- Step 1: attach it to any chart and any timeframe and allow algorithmic trading. It manages positions of all symbols, so one chart is enough.
- Step 2: list symbols you want it to ignore completely in the filter input, separated by commas.
- Step 3: pick a symbol with PREV and NEXT and read its block next to the chart and account blocks.
- Step 4: use the buttons when you need them. Start with the Selected or Current scope until you are comfortable, then use the All scope.
- Step 5: if you want a safety net, set the drawdown percentage and switch auto-hedge on. Check in the Strategy Tester how it behaves with your own positions first.
Every input explained
- MagicNumber: magic number placed on the hedge orders the utility opens, so you can recognise them in history and in other tools. Default 123456.
- dd_percent: account drawdown in percent of balance at which auto-hedge acts, when it is switched on. Default 10.
- filter_out_symbols: comma-separated symbols that are left out of all figures, all buttons and all hedging. Spaces and letter case are ignored. Default XAUUSD,USDZAR.
- HedgeButtonClr: background colour of the three hedge buttons.
- TPClr: background colour of the three remove-take-profit buttons.
- SLClr: background colour of the three remove-stop-loss buttons.
- closeWinClr: background colour of the three close-winners buttons.
- closeLossClr: background colour of the three close-losers buttons.
- panel_width: preferred panel width in pixels. It is used only when it fits in the left half of the chart; otherwise the panel sizes itself. Default 1000.
- panel_height: preferred panel height in pixels, used only when it fits the chart height. Default 600.
- hedge_cooldown_sec: minimum number of seconds between two automatic hedge attempts. Default 30.
- PanelFontSize: starting font size of the panel. It shrinks automatically on small screens. Default 9.
- PanelX: distance of the panel from the left edge of the chart in pixels. Default 10.
- PanelY: distance of the panel from the top edge of the chart in pixels. Default 20.
- TesterDemoTrades: only in the Strategy Tester, opens a few small demo positions at the start so you can try every button. Has no effect on a live or demo chart. Default true.
Good to know
- Hedging buttons and auto-hedge need a hedging account. On a netting account an opposite order would simply close the position, so these buttons are greyed out and the panel says so.
- Hedge volume follows the broker minimum, maximum and lot step; very large volumes are split into several orders. If free margin is not enough the order is not sent and the reason is printed.
- A hedge freezes the floating result; it does not remove the loss. You still decide when and how to unwind it.
- No DLLs, no external files, works on any symbol and timeframe.
An honest request
If Hedge & Position Commander saves you time or stress on a busy day, a short honest review on this page helps other traders decide whether it fits their way of trading. Thank you for reading, and test it in the Strategy Tester first.
