OPEN-SOURCE SCRIPT

S/R & Liquidity Pro

999
Overview
DT S/R & Liquidity Pro is a clean, multi-layer Support and Resistance toolkit that maps three distinct sources of structural memory onto a single chart: pivot-based liquidity zones, daily session anchors, and psychological round numbers. Each layer is independently toggleable, all lines extend right of the last bar, and nothing repaints.

How It Works
Layer 1 — Pivot Liquidity S/R
The indicator scans historical bars for confirmed swing highs and swing lows using a configurable lookback window. Each confirmed pivot is treated as a liquidity zone — a price where a meaningful number of participants were previously stopped out, filled, or reversed. These levels tend to act as magnets on subsequent approaches because trapped positions and pending orders cluster there.
Only the most recent N levels are kept on chart (adjustable input labeled Max Historical Levels), which prevents the chart from becoming a graveyard of every pivot ever made. Lines are color-coded: resistance in red, support in green by default.
What makes a pivot significant: the lookback (Pivot Strength) sets how many bars must form on each side of the high or low before it is confirmed. Higher values = fewer, higher-quality levels. Lower values = more granular intraday structure.

Layer 2 — Session Anchor Levels
Three automatic levels anchor each trading day:
Daily Open — Algos and institutional order flow are benchmarked against this level throughout the day. Reclaims and rejections at the daily open are among the most repeatable intraday setups.
Previous Day High (PDH) — A magnet for liquidity sweeps and breakout/breakdown setups, particularly in the first 90 minutes of the session.
Previous Day Low (PDL) — One of the most watched levels by professional desk traders and algorithms.
These levels update automatically at each new session. No manual input required.

Layer 3 — Psychological Round Numbers
Optional grid of horizontal levels spaced at a user-defined interval (default: every $10). Round numbers attract options strike clustering, retail stop placement, and institutional limit orders. Useful as a secondary confirmation layer, not a primary setup trigger.
Painted as faint dotted lines to minimize visual weight while remaining visible when warranted.

Recommended Inputs by Trading Style:

Scalping / Active Day Trading (1m – 15m chart)
Pivot Strength (Lookback): 5 – 7 — Captures granular intraday swing points; lower bars confirm faster
Max Historical Levels: 4 – 5 — More nearby levels needed for tight intraday decision-making
Show Session Levels: On — Daily Open is a primary intraday reference — essential
Show Previous Day H/L: On — PDH/PDL sweeps are bread-and-butter scalp setups
Show Round Numbers: Optional — Enable on high-priced instruments (e.g., SPX, TSLA) where $5–$10 intervals cluster options strikes
Round Number Step: 5.0 – 10.0 — Match to the instrument's typical daily range

Swing Trading (1H – Daily chart)
Pivot Strength (Lookback): 15 – 25 — Filters intraday noise; only confirms swing-level structural highs/lows
Max Historical Levels: 2 – 3 — On higher timeframes, only the most recent major levels matter
Show Session Levels: Optional — Daily Open is less relevant on a weekly hold; PDH/PDL retain value as weekly structure markers
Show Previous Day H/L: On — Still useful; overnight gaps into PDH/PDL are structural events on swing timeframes
Show Round Numbers: On — Psychological levels matter more over multi-day holds as price cycles through them repeatedly
Round Number Step: 10.0 – 25.0 — Larger intervals appropriate for instruments moving $10–$50 per week

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.