Recovery Grid Fragmentation EA
- Utilitários
-
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 - Versão: 4.30
- Atualizado: 9 novembro 2026
- Ativações: 5
Try it free first: load Recovery Grid Fragmentation EA in the Strategy Tester with visual mode on. It opens one small test position there, lets it run into a real loss, locks it with a hedge and then shows you, level by level, how the locked loss is taken apart in small pieces until nothing is left.
A LOCKED LOSS DOES NOT HAVE TO BE CLOSED IN ONE PAINFUL CLICK. THIS EA TAKES IT APART ONE SMALL PIECE AT A TIME.
Recovery Grid Fragmentation EA is a recovery tool for MetaTrader 5 hedging accounts. When the positions of another EA or your own manual trades have gone deep into drawdown, it locks them with opposite hedges so the loss stops growing, then runs a small grid on the chart symbol. Each profitable grid closure pays for closing one small buy-and-sell slice of the locked book. Pair by pair, the old positions shrink, and the recovery ends only when every managed position is closed.
In short
- Locks every managed position of the account with hedges (or only chosen magic numbers) and keeps the lock intact while it works.
- Fragments the lock in pieces of the size you choose, easiest pair first; pairs already in profit are closed at once and for free.
- A small grid on the chart symbol earns the money for the costly pairs; each closure banks your profit target first.
- Starts on a button, when attached, or by itself at an equity drawdown percent you set.
- Needs a hedging account. On a netting account it shows a red warning and does not trade.
START HERE
- Open a chart of a liquid symbol, for example EURUSD H1, on the hedging account that holds the losing positions.
- Leave Auto-Hedge on Start off for the first run if you want to look before anything happens, then press HEDGE NOW on the panel.
- Keep the grid lot at 0.01 and the fragment size at 0.01 until you have watched a few closures.
- Use one copy per account. It recovers positions on every symbol, not only the chart symbol.
- Keep the terminal running (a VPS is ideal). Nothing happens while it is off.
Why fragmentation instead of one big close
A hedge stops a loss from growing, but it does not make it go away. Closing a large locked pair in one go books the whole loss at once. Fragmentation spreads that cost over time: the grid on the chart earns small amounts in normal market movement, and each amount is used to close a slice of the locked pair that costs about as much as was just earned. The account balance moves in small steps instead of one cliff, and you can see on the panel exactly how far the work has come.
What one recovery looks like
Lock. When the recovery starts, the EA can close the charts of the EA that caused the drawdown and delete its pending orders (both optional), removes stop loss and take profit from the managed positions so the broker cannot open the lock on one side, and hedges every symbol until buy and sell lots are equal.
Grid. On the chart symbol it waits for a move of the grid distance, opens a first order in the direction you set, and adds levels when price moves against it, with lots that grow by your multiplier and spacing that can widen per level.
Closure. When the newest and the oldest grid order together reach your profit target plus commission plus the price of the next slice, both are closed. Your target is banked, the surplus pays for one slice.
Slice. The cheapest buy-and-sell pair of the locked book is closed in the fragment size. If a pair is already in profit, it is closed immediately without waiting for the grid.
Guard. After every closure and every slice the hedge is checked and repaired. A new position opened by another EA or a hedge closed by someone else is re-locked automatically.
Finish. When no managed position is left and the grid is flat, the recovery is COMPLETE, you get a message, and the EA goes back to IDLE or STANDBY.
The panel
A dark panel on the left of the chart, draggable with MOVE and minimised with the small button; it sizes itself to your screen and leaves the price scale clear. RECOVERY PROGRESS is a bar with the lots already unwound against the lots still locked. RECOVERY STATUS shows the hedge lock, the locked loss in money and positions, the grid cycle, grid orders with their profit, the next fragment and what it costs, the fragmentation pool, banked profit, remaining parts, the next grid spacing, the bar gate timeframe, the stop loss, equity drawdown, base balance and filters. PLANNED CLOSURES lists the pairs in the order they will be closed, with lots, pair profit, how each one is paid (FREE, POOL or GRID CLOSE) and a bar for how much of its price is already funded. CLOSURE HISTORY keeps the latest grid closures and slices. The banner says in one line what is happening. Buttons: HEDGE NOW, VIEW INFO, REHEDGE+RESTART, and in the Strategy Tester also TEST BUY, TEST SELL, CLOSE GRID and CLOSE ALL.
What is new in this edition
- The RECOVERY PROGRESS bar and the LOCKED LOSS row: you see at a glance how much of the lock is gone and what is still open.
- Deposits and withdrawals are recognised whatever the broker writes in the comment, so a deposit can no longer be mistaken for trading profit and spent on slices.
- Hedges larger than the symbol's maximum lot are sent in pieces, so a big book can be locked completely.
- No order is sent into a closed market; after a "market closed" answer the symbol rests for five minutes.
- Partial closes never ask for more than the position holds, and a requote is retried.
- The money check asks one plain question: is there enough free margin, with a 50 percent buffer, for this grid order?
- A second chart with the same symbol and the same two magic numbers is refused, so two copies cannot fight over one grid.
- Optional margin-level timeframe safety for the grid (see below), and the panel refreshes every second even on a quiet market.
- New defaults for a gentler grid: lot multiplier 1.25 instead of 2.0, maximum order volume 1 lot. Old set files still load.
Inputs, every one explained
GRID TRADING SETTINGS
Grid Space = 200 points between the start price and the first order, and the base distance between levels.
Grid Space Multiplier = 1.0. Each next level's distance is multiplied by this (1.0 keeps all equal, 1.2 widens them).
Initial Grid Lot Size = 0.01. Lot of the first grid order.
Lot Multiplier = 1.25. Each new level's lot is the first lot times this to the power of the level.
Maximum Grid Levels = 1000. Upper limit of open grid orders; in practice the lot limit below stops the ladder much earlier.
Up Direction = Buy. When price moves up by the grid space the first order is a buy (false makes it a sell); a move down opens the opposite.
Desired Profit Per Each Closure = 2. Money banked by every grid closure before anything goes to slices.
RECOVERY START / STOP
Auto-Start at Equity Drawdown = false. When true, the EA waits in STANDBY and starts by itself when equity drawdown reaches the percent below.
Equity Drawdown % = 20. The trigger for that auto-start.
Recover Only These Magic Numbers = empty. Comma list of magic numbers to recover; empty means every position of the account, 0 means manual trades.
Remove SL/TP When Locking = true. Strips stops from managed positions so the lock cannot open on one side.
Delete Pending Orders on Start = true. Removes pending orders of the recovered positions so they cannot open new unhedged trades.
Close Charts of Other EAs on Start = false. Closes the charts of other EAs when the recovery starts, which stops them.
Only Stop EAs With These Names = empty. Limits the previous option to EAs whose name contains one of these words.
Push Notification on Start / Complete = false. Sends a message to the MetaTrader app on your phone.
HEDGE MANAGEMENT SETTINGS
Auto-Hedge on Start = true. Starts the recovery as soon as the EA is attached (not on a timeframe change).
Verify and Re-Hedge After Every Operation = true. Checks the lock after each close and repairs it.
Max Retries for Hedge Verification = 3.
Enable Hedging Cooldown = false, Cooldown = 5 seconds. A pause between hedge actions for brokers that dislike fast bursts.
Magic Number for Hedge Orders = 123456. Must differ from the grid magic.
Symbols to Exclude from Hedging = empty. Comma list of symbols the EA leaves alone.
FRAGMENTATION SETTINGS
Fragmentation Lot Size = 0.01. Size of one slice. Smaller slices cost less each and take more steps.
Enable Date Filter = false, Only Fragment Before = 2025.01.01. When on, only positions opened before this date are recovered.
Enable Copy Trade Recognition = false, Copy Trade Identifiers 1-3 = "5P@", "C", "#". When on, positions whose comment carries one of these marks (a single character only at the start of the comment) are left alone.
PROFIT MANAGEMENT SETTINGS
Use Actual Account Balance = true. The starting balance is the account balance; deposits and withdrawals move it.
Manual Balance = 0. The starting balance to use when the previous input is false.
Percentage of Profit to Retain = 50. Share of profit above the starting balance that is kept; the rest may pay for slices.
Use Closure Profits for Fragmentation = true. Profit from slices that closed in profit goes into the fragmentation pool.
STOP LOSS SETTINGS
Enable Stop Loss in $ = false, Amount = 100. Closes the grid orders when their own floating loss reaches this amount and halts the grid. The lock stays. REHEDGE+RESTART resumes.
PROTECTION SETTINGS
One Order per Bar = true. At most one new grid order per bar of the bar gate timeframe.
Maximum Slippage = 30 points. Maximum Spread = 7500 points; no grid order above it.
Maximum Volume of Single Order = 1. The ladder stops adding levels when the next lot would be larger.
Maximum Number of Grid Orders = 1000.
Magic Number for Grid Orders = 9751421.
Use Full Commission = true, Commission per 1 Lot = 0. Commission included in every closure target (both sides when full).
ORDER COMMENTS
Comments for grid orders, hedge orders, closes and slices: RG_Grid, RG_Hedge, RG_Close, RG_Frag.
BALANCE TRACKING SETTINGS
Number of Deposit Notifications = 3, Notification Cooldown = 1440 minutes. Kept for older set files.
DISPLAY SETTINGS
Panel X = 30, Panel Y = 30. Start position of the panel; drag it with MOVE.
Panel Font Size = 9. The panel shrinks its font and drops its least important rows on a small chart.
Planned Closures Rows = 6, Closure History Rows = 5.
Hide Trade Arrows/Levels on This Chart = true. Keeps the terminal's own trade marks from covering the panel; restored when the EA is removed.
Screenshot Directory = Recovery_Grid_Screenshots. A chart picture is saved after each closure, slice and stop loss (not in the tester).
Panel Width, Panel Height, Panel Corner, Panel Background, Panel Text Color, Closure Line Color and Width, Distance Between Panels, Closures Panel Width: kept so older set files load. The panel now sizes itself and always starts at the top left.
MARGIN-LEVEL TF SAFETY
Use Margin-Level TF Safety = false. When on and the margin level falls to Level 1 (6000 percent) the one-order-per-bar gate moves to Level 1 TF (M15); at Level 2 (5000 percent) to Level 2 TF (H1). Fewer new levels per hour while margin is tight. Never below the chart timeframe; it steps back once the margin level is 10 percent above the level. The panel shows the active timeframe.
DEBUG SETTINGS
Enable Debug Logging = false. Panel Update Interval = 3 seconds between work passes.
STRATEGY TESTER
Open Test Order in Strategy Tester = true. The tester has no old positions, so the EA opens one itself.
Test Order Lot Size = 0.10, Direction = Buy.
Hedge Test Order After X Points Loss = 500. The test order is locked only after it has lost this many points, so there is a real loss to recover.
Honest test results
Strategy Tester, 1 minute OHLC model, 1 January 2025 to 30 September 2026, leverage 100, hedging account, all inputs at default.
- EURUSD H1, deposit 10,000: net +38.64, profit factor 1.33, maximal equity drawdown 207.01 (2.07%), 40 trades, recovery completed.
- EURUSD H1, deposit 1,000,000: the same trades and result, drawdown 0.02%.
- XAUUSD D1, deposit 10,000: net +30.13, profit factor 1.11, maximal equity drawdown 100.46 (1.00%), 35 trades, recovery completed.
- XAUUSD D1, deposit 1,000,000: the same trades and result, drawdown 0.01%.
No margin refusal, no stop-out and no failed order in the journal of these runs. Read these numbers for what they are: one small test position of 0.10 lot was recovered in each run, then the EA had nothing left to do. They show that the mechanism works, not how a large real drawdown will end. Real recoveries depend on the size of the lock, the swap you pay while it is open and how the market moves. Not tested here: a live account, a netting account, several symbols at once, the auto-start, closing other EA charts and the margin timeframe safety.
What it cannot do
It cannot make a loss disappear. Every slice that costs money is paid by grid profit that would otherwise be yours; the recovery turns one large loss into many small ones and gives the market time. A locked book also pays swap every night. A grid adds exposure of its own: keep the lots small and the account able to carry a long trend. Test on your own broker's data first; spreads, swaps and margin rules differ.
Try it in the Strategy Tester
Pick Recovery Grid Fragmentation EA, EURUSD H1, a deposit of 10,000, visual mode, and press Start. Watch the test order fall 500 points, get locked, and then watch the progress bar fill as the slices close. Use TEST BUY or TEST SELL to add more positions and HEDGE NOW to lock them.
If it helped you climb out of a drawdown, or something on the panel was unclear, an honest review on the product page helps other traders decide and shows me what to improve next.
