The PipAtlas Liquidity Sweep indicator detects price sweeps where a candle extends beyond a recent reference high or low but closes back within the prior boundary.
//@version=5
// PipAtlas Liquidity Sweep Detector — https://pipatlas.com/tools
// Marks the moment a bar trades beyond the previous session high or low and closes back inside.
// That is a price event, not a prediction: plenty of sweeps keep going. Education only,
// never financial advice. MIT licensed.
indicator("PipAtlas Liquidity Sweep", overlay = true, max_lines_count = 100)
lookback = input.int(20, "Bars forming the reference high/low", minval = 5)
useAsia = input.bool(true, "Restrict the reference window to the Asian session")
asiaSess = input.session("2000-0200", "Asian session (exchange time)")
showLabels = input.bool(true, "Label each sweep")
inAsia = not useAsia or not na(time(timeframe.period, asiaSess))
sinceStart = ta.barssince(not inAsia == false) // resets on a session change
refHigh = ta.highest(high, lookback)
refLow = ta.lowest(low, lookback)
// a sweep: trade through the level, close back the other side of it
sweptHigh = high > refHigh[1] and close < refHigh[1]
sweptLow = low < refLow[1] and close > refLow[1]
plotshape(sweptHigh and showLabels, title = "Swept prior high", style = shape.triangledown,
location = location.abovebar, color = color.new(color.red, 0), text = "sweep")
plotshape(sweptLow and showLabels, title = "Swept prior low", style = shape.triangleup,
location = location.belowbar, color = color.new(color.teal, 0), text = "sweep")
plot(refHigh, "Reference high", color = color.new(color.red, 70))
plot(refLow, "Reference low", color = color.new(color.teal, 70))
// what the detector cannot do: it cannot see orders, and one sweep is one observation.
alertcondition(sweptHigh or sweptLow, title = "Liquidity sweep", message = "Liquidity sweep on {{ticker}} ({{interval}})")
Overview
Reference levels are calculated over a customizable bar lookback period and can be constrained to the Asian session. It plots the high and low reference lines directly on the price chart and marks detected liquidity sweeps with visual triangle shape labels, supported by built-in alerts.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Bars forming the reference high/low
int
20
lookback
Restrict the reference window to the Asian session
bool
true
useAsia
Asian session (exchange time)
session
2000-0200
asiaSess
Label each sweep
bool
true
showLabels
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.
The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh
Indicatorv6SMC / ICT / price actionSessions & time
This indicator overlays options gamma-exposure levels, session VWAP bands, and intraday market structure tools directly on the price chart. It provides three modular components: strike walls with standard deviation bands and opening ranges, a gamma regime engi
This indicator detects and draws the first Fair Value Gap (FVG) that forms in each hourly session based on a selected lower timeframe, with specialized handling for Regular Trading Hours (RTH) confluence windows. It draws FVG range boxes, midpoint lines, hourl
This indicator combines six trading tools into a single chart overlay to optimize indicator limits. It calculates Bollinger Bands, projects weekend price boundaries, plots market structure elements like order blocks, breaker blocks, and MSB lines, marks New Yo
ICT Everything is a technical analysis indicator that plots Inner Circle Trader (ICT) session ranges, midnight open price lines, and historical session markers directly on the price chart. It highlights major trading sessions including London, New York, London
This Pine Script indicator automatically marks Smart Money Concepts on the price chart. It identifies swing highs and lows as HH, HL, LH, LL using a configurable swing length. It detects breaks of market structure (BMS/BOS) and changes of character (CHoCH), wi