- Strategy
- Sells when a candle trades above an untouched swing high but closes back below it and price then closes below the recent low that led into the sweep; buys on the mirror image at swing lows.
- Risk model
- 1% of balance per trade (configurable), stop-loss beyond the sweep extreme on every order, one position per symbol and magic number
What it does
Obvious swing highs and lows tend to collect stop orders. When price spikes through such a level and then closes back inside, the move is often called a liquidity sweep. Liquidity Sweep Reversal EA looks for that pattern and then waits for confirmation, a close through the nearby structure in the opposite direction, before it enters.
The stop sits just beyond the sweep extreme, so the trade is wrong as soon as price moves past the spike.
How it works
The EA uses closed candles only, checked at each new bar:
- Resting liquidity: the latest swing high (higher than the 5 bars on each side) that no later candle has traded above.
- Sweep: the last closed candle trades above that swing high but closes below it. Each swing can be swept only once.
- Shift level: the lowest low of the 5 candles before the sweep candle.
- Trigger: if a candle closes below the shift level within 6 bars, the EA sells at market. If price trades above the sweep high first, or the time runs out, the setup is cancelled. If the sweep candle itself already closes below the shift level, the EA enters at once.
- The stop goes above the sweep high plus 0.2 ATR; the target is 2 R.
Buys follow the mirror rules at untouched swing lows.
How to use it
The pattern appears on every timeframe; M5 to H1 during the London and New York sessions are a practical start. A larger swing strength picks only well-known levels, which are swept less often but more meaningfully. Shorter shift lookbacks give quicker, tighter confirmations. The Experts tab shows each sweep and the level the EA is waiting for.
Settings
| Input | Default | What it changes |
|---|---|---|
| Swing strength | 5 | Significance of the swept level |
| Lookback bars | 120 | How far back to search for untouched swings |
| Shift lookback | 5 | Bars that define the confirmation level |
| Shift max bars | 6 | Time allowed for confirmation |
| Stop buffer (x ATR) | 0.2 | Room beyond the sweep extreme |
| Max stop (x ATR) | 3.0 | Skips very large spikes |
| Risk % / Fixed lots | 1.0 / 0 | Position sizing |
| Take-profit (R) | 2.0 | Target distance (0 = none) |
| Max spread / hours | 30 points / 7 to 20 | Entry filters |
| Break-even / Trailing | on at 1 R / off | Trade management |
Limitations
This is a counter-move strategy: in strong trends, sweeps are frequently followed by continuation rather than reversal. There is no trend filter by design, so expect losing streaks when markets trend hard. News releases produce spikes that look like sweeps but behave unpredictably. The confirmation close can come far from the sweep extreme, which means a wide stop and a small position.
Before you run it live
Run the EA in the Strategy Tester and on a demo account first, and look at the trades it takes around news. Consider limiting the trading hours to your main session. Check your broker's spread and stops level, and keep the risk small. Our lesson on support and resistance explains why swing levels attract orders. Trading carries a substantial risk of loss.

