Loading…

Sweep And Reclaim System

A bare close beyond a recent swing level is ambiguous: it could be the start of a real breakout, or it could be a stop-run that runs out of follow-through. This system specifically wants the shape that separates the two - a wick that pokes through the level by a minimum distance, followed by the SAME bar closing back on the original side, reclaiming most of its own range in the process. A clean breakout close with no wick through the level first does not qualify; neither does a wick that sweeps the level but closes near its own extreme rather than reclaiming it. The swing level itself is the highest high or lowest low over a trailing lookback window (excluding the signal bar), so it re-centres on wherever the market has actually been making its recent extremes, rather than a fixed round-number level. The stop sits a small buffer beyond the sweep's own extreme - the level a genuine breakout would need to hold, not just touch - and the target is a configurable reward:risk multiple of that stop distance. Notes and limitations - Only one position at a time; a new sweep is ignored while a trade from a previous one is still open. - A market making a genuine, sustained breakout can still produce an occasional wick-and-reclaim bar before continuing - this system will take that trade and be wrong; the fixed stop bounds the loss. - The swing level recalculates every bar from the trailing lookback, so it can shift meaningfully after a strong directional run even without a new signal firing. - Lot sizing uses MODE_TICKVALUE/MODE_TICKSIZE, not a hardcoded contract size.

Expert advisor · MT4 · v1.0 · Free

About Sweep And Reclaim System

Sweep And Reclaim System is an expert advisor (trading robot) for MetaTrader 4. It can size trades from your balance and risk percent. It has 12 settings, such as Swing lookback, Min sweep pips and Max reclaim body pct. MQL source code included.

Files in the download: SweepAndReclaimSystem.ex4, SweepAndReclaimSystem.mq4, SweepAndReclaimSystem.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Swing lookback30Bars scanned (excluding the signal bar) to find the swing high/low to sweep
Min sweep pips3.0Minimum distance the wick must poke beyond the swing level, in pips
Max reclaim body pct60.0Signal bar's close must reclaim at least this % of its own range back past the level
Stop buffer pips5.0Stop placed this many pips beyond the sweep's own extreme
Target rr2.0Target distance as a multiple of the stop distance (reward:risk)
Use risk sizingtrueSize by percent risk to the stop instead of a fixed lot
Risk percent1.0Percent of equity risked per trade, when risk sizing is on
Fixed lots0.10Lot size when risk sizing is off, or as a sizing fallback
Magic number35801Magic number for orders opened by this EA
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per trade action before giving up
Retry wait ms500Pause between attempts, milliseconds

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Breakout · Risk & Lot Size · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria