Liquidity Sweep

Mark the liquidity sweeps in every ticker’s candles: a candle that trades through the lowest low (or highest high) of the previous 15 bars, where stop orders tend to rest, and closes back inside with a long wick.

Traders read it as a stop hunt that has run its course, so a sweep below the lows (bullish) hints at a move up and a sweep above the highs (bearish) at a move down.

The formula is as follows:

\[\text{Swing Low} = \text{lowest Low of the} \;\text{window} \;\text{bars before the candle},\;\; \text{Swing High} = \text{their highest High}\]
  • Bullish Sweep (1): Low < Swing Low, Close > Swing Low, Close > Open and lower shadow > wick_multiple x real body

  • Bearish Sweep (-1): High > Swing High, Close < Swing High, Close < Open and upper shadow > wick_multiple x real body

The real body is |Close - Open|, the lower shadow runs from the bottom of the body to the Low and the upper shadow from the top of the body to the High.

The liquidity sweep (or stop hunt) is a pattern defined by the ICT (Inner Circle Trader) and Smart Money Concepts community, without a primary publication. The measurable form with a swing over the previous 15 bars and a wick longer than 1.5 times the body is pandas-ta-classic’s.

Also known as: liquidity sweep, liquidity grab, stop hunt, stop run, smart money concepts, SMC, ICT, swing failure, smc_sweep.

Example · AAPL, MSFT · 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_liquidity_sweep:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2025-01-01",
    end_date="2025-12-31",
)

sweeps = toolkit.technicals.get_liquidity_sweep(signals_only=True)

sweeps

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

On which days in 2025 did Apple or Microsoft show a liquidity sweep?

Which returns:

Parameters

get_liquidity_sweep accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe time period to consider for historical data. Options are: “intraday” (intraday prices), “daily” (daily prices), “weekly” (weekly prices), “monthly” (monthly prices), “quarterly” (quarterly prices), “yearly” (yearly prices). Defaults to “daily”."weekly"
close_columnstrThe column name for closing prices in the historical data. Defaults to “Adj Close”, in which case the open, high and low prices are adjusted for dividends in the same way. “Close” uses the candles as traded (split-adjusted)."Close"
windowintThe number of previous bars the swing low and high are taken over. Defaults to 15.20
wick_multiplefloatHow many times the real body the wick through the swing must exceed. Defaults to 1.5.1.5
signals_onlyboolWhether to return only the periods in which at least one ticker has a sweep. Defaults to False.False
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

  • Library Referenced against pandas-ta-classic’s smc_sweep
Share