What it does
FXP Liquidity Sweeps looks for equal highs and equal lows, the kind of double tops and bottoms where many traders place stop orders just beyond the level. These levels are drawn as dashed lines. When a candle trades through such a level but closes back on the original side, the indicator plots a sweep arrow on that candle.
A sweep of highs (red arrow above the candle) suggests buying above the level failed to hold; a sweep of lows (blue arrow below) suggests selling below the level failed.
How it works
- Swing highs and lows are confirmed with a pivot length on both sides (3 by default).
- Each confirmed swing is stored. When a new swing high lands within the tolerance of an earlier, still-intact swing high, the two become an equal-highs level at the higher of the two prices. The tolerance is a fraction of the 14-period ATR, so it adapts to the market. Equal lows work the same way.
- On each closed candle, every stored level is checked:
- If the high trades above an equal-highs level and the close is back below it, it is a sweep: an arrow is plotted and the line is finished as dotted.
- If the close is above the level, it is a genuine break: the line is finished without an arrow.
- Equal lows are mirrored.
- Levels not touched within the age limit are discarded. With the single-swing option on, ordinary swing points can be swept too.
Arrows are placed only on closed candles and are never moved later.
How to use it
Copy the .ex5 file into MQL5/Indicators and attach it to a chart.
A sweep is a failed breakout. Traders who use the concept often wait for a sweep of highs near resistance in a range or downtrend, then look for a lower-timeframe shift in structure before considering a short, with the stop beyond the sweep wick. Sweeps against a strong trend often fail, so check the higher timeframe first. Our lesson on liquidity explains why clustered stops attract price.
Settings
| Input | Default | What it changes |
|---|---|---|
| Swing pivot length | 3 | Larger values use only more significant swings. |
| Equal-level tolerance (x ATR) | 0.10 | Wider tolerance finds more equal levels. |
| ATR period | 14 | Volatility reference for the tolerance. |
| Forget swings older than N bars | 300 | Age limit for untouched levels. |
| Also detect sweeps of single swing points | false | Adds sweeps of any swing, not only equal levels. |
| History bars to analyse | 2000 | Look-back for drawing. |
| Equal highs / equal lows line color | red / blue | Line colors. |
| Swept/broken lines kept on chart | 30 | Cap on finished lines. |
| Alert on sweeps | false | One alert per bar. |
| Also send push notification | false | Sends alerts to the mobile app. |
Limitations
- What looks like a sweep on a closed candle can be followed by a full breakout on the next candle.
- The tolerance and pivot length change the results considerably; very small tolerances find few levels on volatile instruments.
- Charts in MetaTrader are built from bid prices, so a sweep on the chart may differ slightly from where buy stops (triggered on the ask) actually filled.
- The arrow describes price behavior, not intent. Always use a stop-loss. Trading involves substantial risk of loss.

