Basket Lock Manager
- Utilities
- Version: 1.0
- Activations: 5
Basket manager for MT5: treats a group of positions as one trade and closes them together at a profit target, a loss limit or when a trailing basket profit is given back.
Basket Lock Manager is a trading utility for MetaTrader 5 - basket take-profit, stop and trailing for a group of positions. Many positions, one decision - close the whole basket at the right moment. It works on any symbol (designed with XAUUSD / gold in mind) and on hedging and netting accounts.
What it does
- Basket target and stop - in money and/or in % of balance; the basket is the floating profit (including swap) of all positions in the chosen scope.
- Basket trailing - once the basket profit reaches a level, the peak is tracked and the basket is closed if it gives back a set % of that peak.
- One-click buttons - close buys, close sells, close winners, close losers, close all.
- Scope - this symbol, manual trades only, or the whole account (also works with positions opened by other EAs).
Safety (built in)
- The tool never uses martingale, grid or averaging down. Orders it opens always carry a stop-loss.
- Lot size from risk % of equity (or a fixed lot), normalised to the broker's min / max / step and reduced if free margin is not enough.
- Stop-loss and take-profit changes respect the broker's stops and freeze levels; no orders or closes are sent while the market is closed.
- Every action is printed to the Experts log so you can see what the tool did and why.
Strategy Tester demo
MetaTrader 5 does not send button clicks in the Strategy Tester, so the free demo runs an automatic demonstration: it opens sample trades every few bars and the tool manages them exactly as it would live. Run it in visual mode to watch the panel. Switch the demo off with the "Strategy Tester: run the automatic demo" input. The demo never runs on a live or demo account.
Inputs
| Input | Default |
|---|---|
| Positions in the basket | All positions on this chart's symbol |
| Close the basket at this profit in money (0 = off) | 0 |
| Close the basket at this profit % of balance (0 = off) | 1.0 |
| Close the basket at this loss in money (0 = off) | 0 |
| Close the basket at this loss % of balance (0 = off) | 2.0 |
| Start trailing the basket at this profit % of balance (0 = off) | 0.5 |
| Close when the basket gives back this % of its peak profit | 30 |
| Default risk per order (% of equity), used when Fixed lot = 0 | 1.0 |
| Fixed lot (0 = size from risk %) | 0.0 |
| Maximum lot per order (0 = broker maximum) | 10.0 |
| Max slippage (points, 2-digit gold scale: 100 = 1.00 USD) | 30 |
| Magic number of orders opened by this tool | 26102304 |
| Panel X position (pixels) | 20 |
| Panel Y position (pixels) | 30 |
| Strategy Tester: run the automatic demo (opens sample trades) | true |
| Strategy Tester demo: bars between sample trades | 24 |
How to use
- Attach the tool to a chart (allow Algo Trading).
- Set your limits in the inputs; the panel appears in the top-left corner (position adjustable).
- Use the panel buttons; the guard rules run automatically every second, even without ticks.
Important notes
- A utility helps you manage risk - it cannot guarantee profit or prevent every loss (gaps and slippage can move price past any level).
- Test on a demo account first. Times are your broker's server time.
- Keep the terminal running (a VPS is recommended) for the automatic rules to work.
