Indicator · Pine Script v6 · On the chart

Red Box Liquidity Sweep

by Deep-2k3

The Red Box Liquidity Sweep indicator detects pivot highs and lows to identify liquidity sweeps and failed breakouts on the main price chart.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code140
Settings12inputs
LicenceNone stated
Last update2 weeks ago10 Nov 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

When price moves beyond a structural pivot level but closes back inside the level within a user-defined bar limit, the script highlights the trap zone with a visual box. Optional Average True Range and volume filters can be enabled to confirm minimum breakout distance and volume spikes.

Details

Published by

Deep-2k3 on GitHub

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

futuresindicatorninjatrader-addonninjatrader-indicatorsninjatrader-strategiesstrategytradingtradingview-ideas

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Pivot Left Barsint10leftBars
Pivot Right Barsint10rightBars
Max Bars for Fakeout to Occurint5maxBars
Require Minimum Breakout (ATR)booltrueuseAtrFilter
ATR Lengthint14atrLength
ATR Multiplierfloat0.3atrMult
Require Volume SurgeboolfalseuseVolFilter
Volume MA Lengthint20volLength
Volume Spike Multiplierfloat1.2volMult
Bearish Trap Boxcolorcolor.new(color.red, 70)redBoxCol
Bullish Trap Boxcolorcolor.new(color.green, 70)grnBoxCol
Show Hunted LevelsbooltrueshowLines
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

This indicator tracks smart money market structure directly on the price chart. It calculates dual-period swing highs and swing lows to detect Changes of Character (CHoCH), Breaks of Structure (BOS), inducements, and liquidity sweeps. When structural levels ar

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · Apache-2.0 GitHub repository of Market Structure with Inducements & Sweeps [LuxAlgo]

Orderblocks (Nephew_Sam_)

by theonetrade
34 stars

This indicator identifies and plots bullish and bearish orderblock levels directly on the price chart based on fractal market structure breaks. It detects swing points using configurable 3-bar or 5-bar fractals, tracks breaks of closes or candle extremes, and

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MIT GitHub repository of Orderblocks (Nephew_Sam_)
28 stars

This indicator maps Smart Money Concepts (SMC) market structure directly onto the price chart. It detects internal and swing structure breaks (BOS and CHoCH), tracks bullish and bearish order blocks, identifies fair value gaps (FVG), highlights equal highs and

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 5 weeks ago · Custom licence GitHub repository of Smart Money Concepts [LuxAlgo] Test B
19 stars

This indicator detects stop hunts and liquidity sweeps around the previous trading day's high and low. During a user-defined New York trading window, it watches for price breaks beyond the prior day's levels followed by a close back inside within a set candle

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 weeks ago · MIT GitHub repository of Liquidity Sweep - Previous Day High and Low
13 stars

This script identifies and visualizes bullish and bearish order blocks on the price chart. It detects low-volatility consolidation ranges followed by breakout moves accompanied by high trading volume. Users can select between Simple, Relative, or Weighted volu

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · MIT GitHub repository of Advanced Order Blocks with Volume

More Support & resistance scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers