OPEN-SOURCE SCRIPT
Liquidity Sweep Follow-Through Guard

A wick through an obvious high or low is often called a liquidity sweep. The useful question is what price does after the level is reclaimed.
**Liquidity Sweep Follow-Through Guard** identifies a sweep of a prior lookback extreme, requires a close back inside that reference, and then evaluates the reversal through holding, extension and path efficiency. The swept level, extreme and ATR reference are frozen when the episode begins.
## Visual guide
- **S+** — a prior low was swept and reclaimed, opening a bullish observation.
- **S−** — a prior high was swept and reclaimed, opening a bearish observation.
- **Shaded zone** — the area between the reclaimed level and the sweep extreme.
- **Orange line** — the frozen reference that must remain reclaimed.
- **Blue line** — the minimum reversal extension.
- **F+ / F−** — efficient bullish or bearish follow-through was confirmed.
- **R** — a confirmed close lost the reclaimed reference.
- **X** — a confirmed close crossed the sweep extreme and fully failed the setup.
- **T** — the observation window expired without a terminal result.
The display is intentionally compact. It has no table and requires no companion indicator.
## Sweep detection
The reference is the highest high or lowest low of the previous 20 completed bars. The current candle must exceed that level by at least 0.10 previous-bar ATR, close back inside it, and devote at least 35% of its range to the rejection wick. References exclude the current bar and are never backdated.
If one exceptional candle sweeps both sides, the candle’s closing direction resolves which episode is tracked. Only one episode can be active at a time.
## Follow-through test
The default confirmation requires:
1. Two consecutive closes remain on the reclaimed side of the frozen reference.
2. Price travels at least 0.30 frozen ATR from the sweep candle close in the reversal direction.
3. Directional progress represents at least 45% of the cumulative close-to-close path after the sweep.
Path efficiency distinguishes direct follow-through from an equally large but noisy move. Repeated back-and-forth closes add traveled path without adding the same directional progress.
## Example
Suppose the lowest low of the prior 20 bars is 100 and frozen ATR is 4. Price trades down to 99.4, then closes at 101 with a qualifying lower wick. The orange reference remains 100 and the default extension target is 102.2. If two closes hold above 100, price reaches 102.2 and efficiency is at least 45%, **F+** is printed. A later close below 100 prints **R**. A close below 99.4 prints **X** and takes priority.
## Behavior and limitations
All state changes and markers occur on confirmed bars. The script uses no future bars, pivot backdating or lookahead requests. Wicks detect the initial sweep, while failure outcomes require confirmed closes.
A sweep is a price pattern, not proof of orders, stop placement or participant intent. Thresholds behave differently across symbols and timeframes. The indicator does not predict outcomes, place trades, size positions or model fees, slippage, liquidity and execution. Standard candles are recommended for interpreting its price-based rules.
BotTradeLab — Human judgment, AI-assisted analysis.
**Liquidity Sweep Follow-Through Guard** identifies a sweep of a prior lookback extreme, requires a close back inside that reference, and then evaluates the reversal through holding, extension and path efficiency. The swept level, extreme and ATR reference are frozen when the episode begins.
## Visual guide
- **S+** — a prior low was swept and reclaimed, opening a bullish observation.
- **S−** — a prior high was swept and reclaimed, opening a bearish observation.
- **Shaded zone** — the area between the reclaimed level and the sweep extreme.
- **Orange line** — the frozen reference that must remain reclaimed.
- **Blue line** — the minimum reversal extension.
- **F+ / F−** — efficient bullish or bearish follow-through was confirmed.
- **R** — a confirmed close lost the reclaimed reference.
- **X** — a confirmed close crossed the sweep extreme and fully failed the setup.
- **T** — the observation window expired without a terminal result.
The display is intentionally compact. It has no table and requires no companion indicator.
## Sweep detection
The reference is the highest high or lowest low of the previous 20 completed bars. The current candle must exceed that level by at least 0.10 previous-bar ATR, close back inside it, and devote at least 35% of its range to the rejection wick. References exclude the current bar and are never backdated.
If one exceptional candle sweeps both sides, the candle’s closing direction resolves which episode is tracked. Only one episode can be active at a time.
## Follow-through test
The default confirmation requires:
1. Two consecutive closes remain on the reclaimed side of the frozen reference.
2. Price travels at least 0.30 frozen ATR from the sweep candle close in the reversal direction.
3. Directional progress represents at least 45% of the cumulative close-to-close path after the sweep.
Path efficiency distinguishes direct follow-through from an equally large but noisy move. Repeated back-and-forth closes add traveled path without adding the same directional progress.
## Example
Suppose the lowest low of the prior 20 bars is 100 and frozen ATR is 4. Price trades down to 99.4, then closes at 101 with a qualifying lower wick. The orange reference remains 100 and the default extension target is 102.2. If two closes hold above 100, price reaches 102.2 and efficiency is at least 45%, **F+** is printed. A later close below 100 prints **R**. A close below 99.4 prints **X** and takes priority.
## Behavior and limitations
All state changes and markers occur on confirmed bars. The script uses no future bars, pivot backdating or lookahead requests. Wicks detect the initial sweep, while failure outcomes require confirmed closes.
A sweep is a price pattern, not proof of orders, stop placement or participant intent. Thresholds behave differently across symbols and timeframes. The indicator does not predict outcomes, place trades, size positions or model fees, slippage, liquidity and execution. Standard candles are recommended for interpreting its price-based rules.
BotTradeLab — Human judgment, AI-assisted analysis.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.