1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
175 lines of Pine Script v6 from indicators/fresh-supply-demand-zones.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Fresh Supply & Demand Zones identifies momentum candles based on ATR period and body size threshold, then scans back for base candles to form zones. Zones can use range mode for clustering or default single-candle approach. Mitigation triggers on wicks or closes after configurable bars. Filters limit zone height in ATR multiples and prevent duplicates. It draws colored boxes for supply (red) and demand (green) zones with optional labels and gray ghost zones for mitigated ones. Main settings include ATR length, body multiplier, lookback bars, range mode, and max zones per side. It works on any timeframe and instrument but is optimized for SMC trading on forex and gold.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
ATR Period
int
14
atrLen
Body ÷ ATR Threshold
float
1.5
bodyMult
Base Lookback Bars
int
5
baseLB
Range Mode (cluster base)
bool
false
useRange
Range Cluster Size
int
3
rangeLB
Mitigation Trigger
string
Wick
mitType
Min Bars Before Mitigation
int
3
mitBuffer
Max Zones Per Side
int
15
maxPerSide
Show Mitigated Zones (gray)
bool
false
showMit
Show Zone Labels
bool
true
showLabels
Min Zone Height (× ATR)
float
0.3
minZoneATR
Max Zone Height (× ATR)
float
3.0
maxZoneATR
Show all 16 settings
Setting
Type
Default
Variable
Supply Fill
color
color.new(#ef5350, 80)
supFill
Supply Border
color
color.new(#ef5350, 40)
supBord
Demand Fill
color
color.new(#26a69a, 80)
demFill
Demand Border
color
color.new(#26a69a, 40)
demBord
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.
This overlay indicator scores liquidity-sweep reversals on the price chart. It looks for a swing high or low violation followed by a recovery close, then grades optional conditions such as RSI and structure into a 0–2 quality score with separate long and short
This indicator identifies market impulses, consolidation zones, and potential stop levels directly on the price chart. It evaluates price movement using dual ATR ratios, tight-range consolidation filters, stochastic momentum, and candle body-to-wick proportion
This overlay indicator marks ICT liquidity void fills on the price chart and can show long and short signals. It places a Fibonacci level inside a displacement candle, defaulting to the midpoint, and draws lines in a chosen style. Optional filters limit the fi
This indicator maps market structure and supply and demand zones on the price chart. It marks validated and optional unvalidated swing highs and lows using a pivot length and extra confirmation bars. Consolidation and impulse moves are measured against ATR to
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 Pine Script indicator overlays institutional liquidity levels on the price chart. It identifies order block levels using pivot highs and lows, then draws mean reversion lines from the 20 and 50 period simple moving averages, a volatility range midpoint pr