Support / resistance done properly. Most public SR scripts paint a horizontal line at every pivot, which produces wallpaper, not analysis. Smart SR Zones does the opposite — pivots are first detected with a volatility-aware engine, then clustered into zones, then scored by volume and touches, then filtered by spacing and distance. What ends up on the chart is the small handful of levels that actually matter for the current market state.
Pivot detection — preset-driven
A single Strength Preset selects the personality of the pivot engine:
Scalp — 4 left / 2 right, 0.4× ATR clustering tolerance, 4-bar minimum spacing. For 1–5m charts. Local — 6 / 4, 0.5×, 8-bar. Tight zones from recent structure. Swing — 15 / 8, 0.9×, 20-bar. The balanced default. Major — 35 / 15, 1.4×, 50-bar. Wide macro zones. Custom — every parameter is exposed for manual tuning.
The preset abstraction means you do not need to refit anything across timeframes — pick the read you want and the engine does the rest.
Clustering, not stacking
When two pivots fall within Cluster Tolerance × ATR of each other they are merged into a single zone, with the box span widened to cover both extremes. This is the difference between a "level" and a "zone": a level pretends price is precise, a zone respects the fact that liquidity sits in a band. The cluster tolerance is ATR-relative so the same setting works across symbols.
Touch counting, properly gated
A pivot must contribute to a cluster from a minimum bar spacing (preset-driven). Without this filter a chop within a zone gets counted as ten separate touches and inflates the strength score. With it, a zone earns its touch count from genuinely independent visits.
Volume-weighted strength + star rating
Each cluster accumulates the bar volume at every contributing pivot. The aggregate is converted to a 1–3 star rating relative to the strongest zone currently on the chart, and is shown in the zone label alongside the touch count. Zones can optionally be coloured by volume share so the visually loudest box is the one carrying the most demonstrated activity.
Zone of Interest (ZOI) — the headline filter
A zone earns the ZOI badge when all of these are true at the same time:
It has met the minimum-touches threshold (so it is real structure). Its volume share is above the ZOI volume threshold (so it is meaningfully active). It has not been touched recently — at least ZOI Quiet bars since the most-recent touch.
In other words, a ZOI is a high-quality level that the market is conspicuously not testing — and these are usually the next levels that matter. The ZOI gets a bright burlywood border with an optional animated pulse so it visually separates from the rest of the SR stack.
Distance hiding
A "Hide zones farther than %" input drops anything whose centre price is too far from current — so when you scroll into history the chart does not get cluttered with macro zones from another era. Set to 0 to keep everything visible.
Broken zones and dropped zones
Two optional historical layers:
Broken — zones that were physically closed through. Renders in a desaturated palette so you can see where structure failed without confusing it for active level. Dropped — zones that were removed not by a break but by reorganisation, because newer / stronger pivots reshuffled the cluster set.
Both are off by default so a working chart stays clean.
Optional signal layer
Three small markers (all off by default) for traders who want execution hints rather than just structure:
Successful test — circle on bars that touched an active zone and rejected. Retest — diamond when price returns to a broken zone from the opposite side, inside a configurable window. Zone reaction — small diamond on a touch-with-hold, plus a text label on physical break events.
A configurable cooldown prevents back-to-back markers from the same zone.
Dashboard
A compact diagnostic table, positionable to any of nine corners, monospaced. Shows nearest support / resistance with distance, current ZOI status, active zone count per side, and the preset in use. A compact mode hides descriptions for narrow layouts.
Alerts
A single high-signal alert is exposed: Zone of Interest activation — fires on the first bar a zone qualifies as a ZOI. The other layers are visual diagnostics, not alert-grade; this is intentional, because the ZOI rule is the strongest filter in the script and is what you actually want to be notified about.
How to read it
Look at the chart and ignore everything except the ZOI-tagged zones and the stars. The stars tell you which historical levels have the most demonstrated activity; the ZOI badge tells you which of those have been deliberately avoided recently. The intersection — a star-rated ZOI close to price — is the cleanest level read this script can produce. Use the volume score and the touch count as a tiebreaker when multiple ZOIs are in play.
Suggested settings
Default Swing preset works well from 1H through 1D on liquid futures, FX, and crypto. Drop to Local for intraday execution and Scalp for tape-reading on minute charts. Major is for weekly / monthly macro reads. The ZOI volume threshold (70%) is intentionally strict — drop it to 50–60% if you want more frequent ZOI candidates.
Originality / what's reused
The vocabulary (pivot, cluster, touch count, broken zone, retest) is public-domain market-structure language. The implementation — the preset-driven engine, the ATR-clustering, the volume-weighted star rating, the ZOI rule (touches + volume share + quiet-period), the dropped-zone reorganisation logic, and the volume-share intensity colouring — is JOAT-original and tuned together as a single system. No third-party code reused.
Open source
Published open-source under the default Mozilla Public License 2.0. The source is fully documented inline — every helper is sectioned, every input has a tooltip, and the structural layers are separable so you can learn from any specific piece. Forks welcome with credit.
Limitations
SR is structural context, not a signal generator. Smart SR Zones does not print buy / sell labels — it prints zones, ratings, and a single high-quality ZOI alert. On extremely illiquid instruments the volume-share rankings will be noisy and the ZOI rule will fire less often; that is the right behaviour. Zones beyond the Pivot Memory horizon are dropped to stay under TradingView's 500-object cap.
—
-made with passion by jackofalltrades
#2026 World Cup Posting Challenge on HTX Square#1$ Margin Trade#BTC Prophet: 20-Day 380 Million HTX Challenge
Tutti i commenti0RecentePopolare