Strategy · Pine Script v5 · On the chart

Liquidity Sweep + Market Structure Shift

by alboogycOdR

This strategy detects liquidity sweeps and market structure shifts by computing swing highs and lows on a base timeframe then drawing zones around them.

View on GitHub

GitHub stars6on the repository
Pine versionv5runs as is
Lines of code226
Settings15inputs
LicenceNone stated
Last update7 months ago16 Mar 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 strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

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

On a confirmation timeframe it identifies sweeps when price exceeds zone boundaries followed by rejection candles. Entries trigger on confirmed sweeps with stops placed beyond the extreme using a percentage buffer. Optional volume spike filters can be enabled and positions sized as a percentage of equity. The strategy overlays signals directly on the price chart.

Details

Published by

alboogycOdR on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Support & resistance, SMC / ICT / price action, Trend

Markets

Any symbol

Timeframes

H4 and above, M15-H1

Risk Notes

  • The strategy can add several entries in the same direction

Settings

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

SettingTypeDefaultVariable
Base timeframe for swingstimeframe60base_tf
Confirm timeframe (sweep detection)timeframe1confirm_tf
Swing lookback (bars on base TF)int24swing_lookback
Minor structure lookback (bars on confirm TF)int5structure_lookback
Zone margin % (e.g. 0.15% = 0.0015)float0.0015zone_margin_pct
Sweep buffer % (how far beyond zone counts as sweep)float0.0015sweep_buffer_pct
Rejection window (candles on confirm TF)int2rejection_candles
Stop buffer beyond sweep extreme (pct)float0.0008stop_buffer_pct
Require volume spike on sweep?boolfalseuse_volume_filter
Volume multiplier (if used)float2.0volume_multiplier
Use mark price for SL placement (where supported)boolfalseuse_mark_price
Webhook secret (included in payload for middleware verification)stringalert_secret
Show all 15 settings
SettingTypeDefaultVariable
Use limit entry (try get better price) else marketboolfalseentry_type_limit
Limit offset (ticks) from last close if using limit entryfloat0.0limit_offset_ticks
Order size: percent of equity per tradefloat1.0qty_percent
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

FilledValueGap A006

by ruckard
13 stars

This strategy enters trades in the opposite direction of filled value gaps, operating under the assumption that price action will resume the primary trend after filling a recent gap. It plots directly on the main price chart and supports MA-based trend filters

Strategy v5 SMC / ICT / price actionTrend
Updated 1 year ago · None stated GitHub repository of FilledValueGap A006

This strategy identifies reversal opportunities based on liquidity sweeps and multi-gate confluence scoring. It evaluates setups using mandatory conditions such as swing sweeps, body and ATR filters, and dual EMA higher-timeframe trend alignment, alongside opt

Strategy v6 SMC / ICT / price actionTrend
Updated yesterday · MIT GitHub repository of Reversal Engine Score [WavesUnchained] Strategy

XXX

by MeridianAlgo
9 stars

This multi-timeframe scalping strategy plots moving averages alongside Smart Money Concepts elements on the price chart. It calculates trend signals using configurable moving average types like ALMA, Hull MA, or TEMA across alternate timeframes. It also plots

Strategy v5 TrendMoving averages Repaints
Updated 4 months ago · MIT GitHub repository of XXX

FVG Strategy

by muammeryldrm42
7 stars

Calculates three-bar Fair Value Gaps (FVG) and filters them using Average True Range. When price mitigates the FVG midpoint, the strategy enters a position in the direction of the gap, provided an optional EMA trend filter is satisfied. Exits are defined by an

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · MIT GitHub repository of FVG Strategy

NQ 9:45-10:15 ICT Strategy

by eddiebelaval
7 stars

This ICT-based strategy trades during the 9:45 AM to 10:15 AM New York session window. It calculates a daily bias using a 20-period daily EMA and tracks previous day highs and lows to identify liquidity sweeps. The script refines order block entry levels and m

Strategy v6 SMC / ICT / price actionSessions & time Repaints
Updated 3 months ago · None stated GitHub repository of NQ 9:45-10:15 ICT Strategy
5 stars

RG Structure is a pivot-constrained break-and-retest strategy that calculates dynamic trendlines, market structure changes, and regime states on the price chart. It identifies support and resistance lines through pivot points and evaluates break-and-retest sig

Strategy v6 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of RG Structure Visual Edition

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers