AI Liquidity Sweep Reversal Trader
- Experts
-
Fadi Hassan Khaled Ghanem
MQL4/MQL5 developer based in Jordan. I have published 169 MetaTrader 5 products on the MQL5 Market (about 8,800 downloads in total).
What I build:
- Custom Expert Advisors from your own trading rules
- Indicators, alerts and multi-timeframe dashboards - Versione: 1.1
Trade the stop hunt, not the breakout trap.
Risk & Requirements at a Glance
- No grid, no martingale, no averaging, no hedging.
- Every trade is opened with a stop loss and take profit. The SL sits beyond the sweep wick plus an ATR buffer; trades that would need a stop wider than Maximum SL are skipped.
- Position size is set by a risk percent per trade, with a maximum lot cap.
- Designed for Forex majors and XAUUSD on an M15 signal timeframe. Gold usually needs a larger SL buffer and maximum SL than EURUSD.
- Trades the whole day by default; an optional session window (server time) can restrict entries.
- Default settings are a starting point, not tuned for your broker. Test at least 12 months in the Strategy Tester on your broker's data and run on a demo first. Results are not guaranteed.
How it works
On each new bar of the signal timeframe (M15 by default) the EA watches two kinds of liquidity: the most recent untapped swing high and swing low, and the previous day high and low. You can watch one of them or both.
A liquidity sweep happens when a candle wicks beyond one of these levels but closes back inside. This is the typical footprint of a stop hunt. The EA then enters in the reversal direction at market. If you prefer extra confirmation, it can wait for the next candle to close in the reversal direction before entering.
The stop loss is placed beyond the sweep wick plus an ATR buffer. The take profit is a reward ratio multiple of the stop distance. Trades with an unusually wide stop are skipped.
An optional session filter limits entries to a time window in server time. By default the EA trades the whole day.
Key features
- Swing high / low and previous day high / low sweep detection
- Optional next candle confirmation
- SL beyond the sweep wick with ATR buffer, TP by reward ratio
- Maximum stop distance filter
- Optional session filter, works across midnight
- Break-even and ATR trailing stop
- No grid, no martingale, no averaging, no hedging
- Every trade is opened with SL and TP
How to Read a Trade
Buy: price wicks below an untapped swing low or the previous day low, but the candle closes back above that level. The EA reads this as sell stops being taken out, and enters long (or waits for the next candle to close bullish if confirmation is on). The stop goes below the sweep wick plus the ATR buffer.
Sell: the mirror case. Price wicks above an untapped swing high or the previous day high and closes back below it. The EA enters short with the stop above the wick plus the buffer.
Why it did not trade: the wick did not reach the minimum sweep depth, the candle closed beyond the level (a real breakout, not a sweep), confirmation was on and the next candle closed the wrong way, the required stop was wider than Maximum SL, the time was outside the session window, or the level was already swept earlier.
Tuning tips: test 12 months in the Strategy Tester on your broker's data first. On XAUUSD a larger SL buffer and maximum SL are usually needed than on EURUSD. If you see many losing reversals during strong trends, turn on next candle confirmation or limit trading to the London and New York sessions. Then run it on a demo account before going live.
Recommended
Forex majors and XAUUSD, signal timeframe M15. Any chart timeframe.
Inputs
Risk percent, maximum lot cap, magic number, signal timeframe, liquidity levels, swing bars, lookback, minimum sweep depth, confirmation, ATR period, SL buffer, maximum SL, reward ratio, session filter, break-even and trailing distances.
Risk note
Trading involves substantial risk. Test on a demo account first.
Frequently Asked Questions
Does it use grid, martingale or averaging?
No. One position per signal, always opened with a stop loss and take profit. Lot size comes from your risk percent per trade and is capped by the maximum lot input.
Why is the EA not opening trades?
Most often the setup was filtered out: the wick did not reach the minimum sweep depth, the candle closed beyond the level (a real breakout, not a sweep), confirmation was on and the next candle closed the wrong way, the required stop was wider than Maximum SL, or the time was outside the session window. Also check that AutoTrading is enabled and the spread and margin allow the trade.
Which symbols and timeframes should I use?
It is designed for Forex majors and XAUUSD with an M15 signal timeframe. The signal timeframe is an input, so you can attach the EA to any chart timeframe. On gold, increase the SL buffer and Maximum SL compared with EURUSD.
Swing levels or previous day high/low - which one?
You can watch either one or both. Swing levels give more signals; previous day high/low gives fewer, larger levels. Test both on your broker's data in the Strategy Tester before choosing.
Can I run it on several charts at once?
Yes. Use a different magic number on each chart so the EA manages only its own positions, and keep the combined risk across charts in mind.
Is there a prop-firm, news filter or MT4 version?
This free version has no daily loss/drawdown guard, no news filter and is MT5 only. These can be added in a custom version - see below.
Need a custom version?
I can adapt this EA to your own rules - extra filters (for example higher-timeframe trend or news times), different money management, prop-firm daily loss and drawdown limits, or an MT4 version. Send me a private message here on MQL5 (or offer me a personal order via MQL5 Freelance) with your requirements, and I'll reply within 24 hours with whether it's doable and the estimated scope.
If you find this free version useful, please leave a review - it helps a lot.
More free tools from the same developer
AI Liquidity Sweep Finder - the indicator version: marks the same sweeps on the chart so you can review them visually before letting the EA trade.
AI Supply and Demand Zones Indicator - shows the zones where sweeps often happen, useful as extra context.
AI Swing High Low Labels Indicator - labels the swing highs and lows whose liquidity the EA looks for.
