Skip to content

Free MT5 indicator

Liquidity Sweeps

Marks equal highs and equal lows as liquidity levels and plots an arrow when a candle wicks through a level and closes back inside.

Smart moneyv1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Alerts

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

  1. Swing highs and lows are confirmed with a pivot length on both sides (3 by default).
  2. 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.
  3. 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.
  4. 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

InputDefaultWhat it changes
Swing pivot length3Larger values use only more significant swings.
Equal-level tolerance (x ATR)0.10Wider tolerance finds more equal levels.
ATR period14Volatility reference for the tolerance.
Forget swings older than N bars300Age limit for untouched levels.
Also detect sweeps of single swing pointsfalseAdds sweeps of any swing, not only equal levels.
History bars to analyse2000Look-back for drawing.
Equal highs / equal lows line colorred / blueLine colors.
Swept/broken lines kept on chart30Cap on finished lines.
Alert on sweepsfalseOne alert per bar.
Also send push notificationfalseSends 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.

Key inputs

Key inputs of Liquidity Sweeps
InputDefaultDescription
Swing pivot length (bars each side)3Defines the swing points that can form equal highs or lows.
Equal-level tolerance (x ATR)0.10Two swings within this distance count as equal.
Forget swings older than N bars300Old untouched levels are dropped after this many bars.
Also detect sweeps of single swing pointsfalseWhen on, any swing high or low can be swept, not only equal levels.
Swept/broken lines kept on chart30Caps the number of finished level lines.
Alert on sweeps (once per bar)falseAlerts when the last closed candle sweeps a level.

Educational tools, not advice. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 indicators