Swept Liquidity Pools

Swept Liquidity Pools identifies two structural elements on the chart: confirmed swing levels,
and the bars where price traded beyond one of those levels before closing back on its inner
side. Every value is calculated from closed bars only, and no marker changes once its bar has
closed.

How a Level Is Formed

A bar becomes a level when its high sits above the highs of PoolPivotBars neighbouring bars on
both sides, or its low sits below their lows. Equal highs and equal lows are treated as a
single level, anchored to the earlier of the two bars.

A level is confirmed only once PoolPivotBars bars have closed to its right, so it appears on
the chart later than the bar it refers to. This delay is inherent to any swing-based detection
method, and it is disclosed here rather than left implicit.

A level is removed under three conditions: it is swept, price closes beyond it, or it exceeds
PoolMaxAgeBars in age. A close beyond the level is treated as a genuine break rather than a
failed attempt, and the level is dropped from tracking from that point on.

How a Sweep Is Identified

A closed bar sweeps a level when all of the following hold: price extended beyond the level by
at least the configured minimum distance and no more than the configured maximum; the bar
closed back on the inner side of the level; and the close gave back at least the configured
share of the bar's own range.

Distances are expressed in units of Average True Range rather than in price points, so one
configuration can be applied across instruments with different price scales. ATR-based
thresholds are timeframe-dependent: the same numeric value represents a different percentage of
price on M1 than on H1. A minimum-distance floor, expressed in instrument ticks, is applied in
parallel, since on low-tick instruments an ATR-based share can fall below a single tick.

Calculation and Repainting

All values are calculated on closed bars only. Once a bar closes, its buffer values are fixed
and are never modified afterward. The currently forming bar never carries a signal.

Buffers for Programmatic Access

Four buffers are exposed and can be read from an Expert Advisor through iCustom:

Buffer 0 - price of the swept level on the bar where a high-side sweep occurred
Buffer 1 - price of the swept level on the bar where a low-side sweep occurred
Buffer 2 - price of the nearest tracked level above
Buffer 3 - price of the nearest tracked level below

Buffers return the empty value on bars carrying no data.

Notes

The first bars of the scan window form a warm-up region and may contain fewer marks, since
levels older than the window do not yet exist within it.

The indicator does not open, close, or manage positions, and does not generate trade
recommendations. It marks price structure only.

The underlying concept is described in classic technical literature under the terms spring and
upthrust. This implementation uses its own formalisation and its own thresholds, independent of
that literature's numeric conventions.

Support

Questions and error reports are handled through the comments section of this product or
through mql5.com private messages.

Input Parameters

PoolPivotBars - bars on each side confirming a level
PoolMaxAgeBars - level lifetime in bars
PoolMergeAtr - levels closer than this distance are treated as one
PoolMinBarRangeAtr - minimum range of a bar that may become a level
ReachAtrPeriod - ATR period used for distance scaling
SweepMinReachAtr - minimum distance beyond a level
SweepMaxReachAtr - maximum distance beyond a level
SweepMinReachTicks - minimum distance in instrument ticks
SweepMinRejectShare - minimum share of the bar range given back at the close
HistoryBarsLimit - bars to scan, zero for all
MarkupVisible, MarkupPoolColor, MarkupSweptHighColor, MarkupSweptLowColor, MarkupLineWidth
NotifyPopup, NotifyPush
Filtrele:
Değerlendirme yok
Değerlendirmeye yanıt