What Counts as a Liquidity Pool, and What Counts as a Sweep

17 September 2026, 12:15
Vasilii Makarenko
0
2
Markup is only as good as its definitions. What turns a high into a level? What turns a bar into a sweep of it? In Liquidity Sweep Pools MTF both answers are rules a bar passes or fails, and every rule is a number in the inputs. A pool is a confirmed extreme that has not been taken yet A bar becomes a liquidity pool when PoolPivotBars bars on each side confirm it, eight by default. The comparison is asymmetric on purpose. To the left, the neighbours must be strictly lower for a high; to the right, equality is allowed. Strict comparison on both sides would throw away plateaus of equal highs, and the resting liquidity sitting on those plateaus is what this tool is built around. The asymmetry settles ambiguity too: on a plateau the level belongs to the leftmost bar, so one shape never registers twice. Two filters shape the rest. A bar whose range is smaller than PoolMinBarRangeAtr of ATR never becomes a pool, which keeps thin-session noise out. Levels sitting closer to each other than PoolMergeAtr of ATR count as one, so a cluster reads as a single level instead of a stack of lines. An untouched pool stops being tracked after PoolMaxAgeBars. A sweep is a measured reach and a measured give-back A sweep is the bar that reaches beyond a live pool and closes back inside the range. Depth. The reach beyond the level must be at least SweepMinReachAtr of ATR, and at the same time at least SweepMinReachTicks of the instrument's own tick size. That tick floor keeps the requirement meaningful on minute charts, where a small share of ATR can be narrower than a single tick. The reach also has to stay under SweepMaxReachAtr of ATR. Past that distance the bar is a breakout, not a sweep. Return. The close must come back inside the level. A close exactly on the level does not qualify. A close beyond it is a genuine break, and the pool is retired rather than marked. Rejection. The bar must give back at least SweepMinRejectShare of its own range, measured from its extreme to its close, so a long body with a small tail does not pass. When several levels on the same side qualify on one bar, the one nearest the bar's extreme gets the mark. That is the liquidity actually reached. Everything is computed on closed bars The scan runs to the last closed bar, ATR comes from the bar before it, and the forming bar always carries the empty value. Once a bar closes its buffer values are fixed and nothing rewrites them later. A mark that appeared on your chart yesterday is in the same place today, so you can audit any mark in history against the rules above. The higher timeframe is computed, not borrowed The multi timeframe version runs the same pool rule over the higher timeframe's own bars and keeps the result in its own two buffers, instead of projecting lines from another chart. That is where the precision of the levels comes from. Causality is extended across timeframes rather than relaxed. A higher timeframe pool becomes visible on the lower chart no earlier than the close of the higher timeframe bar that confirmed it, so nothing is back-dated onto bars that existed before the level could have been known. Both sets of levels are drawn side by side in their own colours and widths. The higher timeframe is set strictly above the chart. Any other choice leaves the function off, with one line in the log and your chart untouched. The panel, the volume filter and the CSV A table in the corner lists the active pools, youngest first: level, side, distance from the last closed price in ATR units, age in bars, and the timeframe it belongs to. It refreshes when a bar closes or when the set of pools changes, not on every tick, and its row count is capped. States are written out rather than implied: "MTF: loading history" while higher timeframe data is still arriving, "Volume filter: 0 pools passed" when the filter leaves nothing. The volume filter can require the pool bar's volume to clear a ratio of the median over a lookback window. Real volume is empty on most forex feeds, so the automatic mode checks the recent window, switches to tick volume when it is absent, and logs the switch. It is off by default. On request the indicator writes detected sweeps to a CSV file in the terminal's local Files folder, once per chart session: time, symbol, timeframe, side, level price, the sweep bar's high, low and close, the reach beyond the level, the share of the range given back, the pool's age and its confirmation time. The write is atomic, through a temporary file renamed into place. Those columns are enough to rebuild the detection on your own data. Six buffers are exposed for iCustom: the swept level on each side, the nearest tracked level above and below on the current timeframe, and the same pair on the higher one. There is a version for one timeframe and a version for two. If these definitions match how you read liquidity, open the product page and run it on your own chart, or in the Strategy Tester in visual mode, checking a few marks against the inputs.