OPEN-SOURCE SCRIPT
Aggiornato Smart S/R Zones

This is not your average S/R script.
It combines proximity, bounce frequency, and volume clustering to automatically identify the most reliable support and resistance zones on your chart — no guesswork needed.
How It Works:
• Scans for recent highs/lows, SMA50 & SMA200, and pivot swing points
• Ranks each potential level using a weighted scoring system:
• Proximity to current price (50%)
• Bounce Count (30%) — how many times price respected that level
• Volume Score (20%) — how much volume traded around that level
• The top support and resistance levels are plotted with:
• Clear dashed lines
• Color-filled zones
• Simple percentage distance labels
Why This Script Stands Out:
• No settings to tweak — it just works
• Helps you react faster with high-confidence levels
• Adapts to any market: crypto, forex, stocks, indexes
• Ideal for both intraday and swing trading setups
Built-in Intelligence. Clean Visuals. Zero Noise.
It combines proximity, bounce frequency, and volume clustering to automatically identify the most reliable support and resistance zones on your chart — no guesswork needed.
How It Works:
• Scans for recent highs/lows, SMA50 & SMA200, and pivot swing points
• Ranks each potential level using a weighted scoring system:
• Proximity to current price (50%)
• Bounce Count (30%) — how many times price respected that level
• Volume Score (20%) — how much volume traded around that level
• The top support and resistance levels are plotted with:
• Clear dashed lines
• Color-filled zones
• Simple percentage distance labels
Why This Script Stands Out:
• No settings to tweak — it just works
• Helps you react faster with high-confidence levels
• Adapts to any market: crypto, forex, stocks, indexes
• Ideal for both intraday and swing trading setups
Built-in Intelligence. Clean Visuals. Zero Noise.
Note di rilascio
relocating labels Note di rilascio
Improved detection of flipped support and resistance zones.Better prioritization of higher structural levels when multiple supports are present.
Note di rilascio
Update v3.0 — Structural Flip Memory + Smarter Breakout HandlingThis version brings a major boost in structural awareness and resilience:
New Features
Multi-Flip Memory (array-based):
Tracks multiple broken support and resistance levels over time and remembers them for retest opportunities (default: 50 bars).
Scoring Boost for Structural Zones:
Levels that were respected from both sides (support and resistance) now receive a bonus, improving accuracy in dynamic markets.
Clear Fallbacks for New Highs & Lows:
New lows: If no valid structure is found, the script looks deeper in history (up to a configurable limit), and if needed, falls back to the closer of 1H SMA50 or SMA200.
New highs: When uncharted, Fibonacci extensions (1.272 / 1.618) are used to project potential resistance zones.
Visual & Usability Enhancements
• Labels restored to original compact style (above/below lines with % distance)
• New yellow label when support is sourced from the 1H SMA (for clarity)
• Boxes offset slightly forward to avoid overlapping candles
Note di rilascio
Update v3.2 – Multi-Timeframe Awareness + Refined Flip HandlingThis version improves the indicator’s adaptability and precision with key structural upgrades:
Smart Multi-Timeframe Support Fallbacks
• The fallback SMA logic now adjusts automatically based on your chart timeframe:
• Under 1H → uses 1H
• Between 1H and 1D → uses 1D
• At 1D or higher → uses 1W
• Ensures structural context is preserved across all timeframes
Improved Flip Zone Logic
• Broken support/resistance is now added as a potential flip zone immediately after the break (pre-retest) with a moderate bonus
• Once the level is retested from the opposite side, it receives a higher scoring bonus
• This balances early visibility with post-confirmation prioritization
These changes improve both structural integrity and responsiveness in trending markets, especially on higher timeframes.
Note di rilascio
minor updateNote di rilascio
updating inputs with tooltipsNote di rilascio
A major upgrade: a ranked levels table that shows you the strongest nearby support and resistance levels, right on the chart.What’s new?
• A clean, color-coded table splits support (red) and resistance (green)
• Each level is scored and ranked by strength, factoring in bounce history, volume, proximity to price, and more
• You’ll see clear tags like:
• Swing High / Swing Low
• SMA 50 / SMA 200
• Flipped Support / Resistance (zones that changed roles)
• Highest High / Lowest Low
How is it sorted?
Levels are scored using a weighted model behind the scenes, then ranked top-down so you always see the most relevant zones first. No clutter — just the best.
And if price is exploring new ground?
• For new highs, we show projected resistance using Fibonacci extensions
• For new lows, we fall back to higher timeframe moving averages (SMA 50 or SMA 200 from 1H or Daily), whichever is closer to price
That means the Smart S/R Zones script never leaves you without a zone, even in trending or price discovery markets.
Note di rilascio
minor fixNote di rilascio
This update puts the power in your hands:1. Custom Scoring Weights
You can now adjust how support/resistance zones are ranked by assigning your own weights to:
• Proximity to price
• Bounce frequency
• Volume concentration
This directly influences how zones appear in the ranked levels table, letting you tailor it to your trading style.
2. Custom Short & Long Moving Averages
Choose your preferred type (SMA or EMA) and length for both short-term and long-term MAs.
These are used as:
• Zone candidates
• Fallback zones when no recent structure is found
• Optional lines on the chart for visual guidance
3. Built-In Alert Conditions (Fully Adjustable)
Two built-in alerts — one for long setups and one for short setups — can now be activated with full control via inputs:
• Max distance to support/resistance
• Min distance to opposite zone
• Minimum support/resistance ratio
This lets you filter for high-quality breakouts or retracement setups based on your strategy, and automate your workflow with TradingView alerts.
Enable Advanced Mode to see the ranked table live — and let Smart S/R Zones help you focus only on the most relevant levels.
Note di rilascio
To your requests - Added new color scheme for light backgroundsNote di rilascio
Bug fix of the calculation of the fib extension level.Added color customization - choose colors for the zone boxes and their labels
Note di rilascio
This script provides a dynamic and intelligent approach to identifying and ranking support and resistance zones. It uses a combination of price action, pivot structure, volume interaction, and fallback mechanisms to ensure robust zone detection, even in complex market conditions.What the script does:
It detects potential support and resistance levels based on swing highs/lows, pivots, breakout memory (flip zones), and price proximity to key moving averages. Every detected level is scored according to how relevant and reactive it is — measuring proximity, bounce count, volume engagement, and whether it has acted as both support and resistance in the past.
How it works:
Each bar, the script scans for pivot-based turning points and swing highs/lows within a configurable lookback period. It tracks recently broken support and resistance levels and considers them as potential reversal zones (flipped zones). These levels are stored in memory and scored accordingly.
In addition to pivots, the script uses short and long moving averages (configurable as SMA or EMA) and evaluates their relevance as active zones. If no valid levels are found in the current timeframe, it automatically falls back to higher timeframe moving averages or calculates a Fibonacci extension based on the most recent swing structure.
The best-scoring levels are selected and displayed as zone boxes on the chart, with optional labels. A ranked table appears (when enabled) that summarizes the top support and resistance zones along with their type and distance from current price.
Why these elements are combined:
Support and resistance are not reliably found using one method alone. This script combines several techniques — pivots, flips, volume zones, moving averages, and fib extensions — to create a more complete picture of price behavior. The combination improves accuracy, consistency, and adaptability across different market structures.
Signals and alerts:
This version introduces fully customizable long and short signal logic. Traders can define how close support should be, how far resistance must be, and what minimum support/resistance ratio they want to consider before getting alerted. These signals are ideal for anticipating bounces or rejections in key zones and can be automated using TradingView alerts.
Customization:
The script includes user inputs to customize scoring weights (proximity, bounce, volume), moving average type and length, zone colors, and alert thresholds. It also supports light and dark themes automatically to ensure visuals remain clear and readable.
The code is fully custom, built from the ground up to intelligently score and manage multi-source levels with fallback handling. It is not based on a repurposed indicator or copied logic. All features are designed to work in unison — not as a mashup — but as a layered forecasting model
Note di rilascio
Update Highlights:Integrated Shorter & Longer Timeframe Levels:
The script now detects support and resistance levels from adjacent timeframes (e.g., 5m levels while on a 15m chart). These are evaluated and ranked together with your current timeframe zones, but only if they are sufficiently distinct to add value.
New Support Fallback Mechanism:
When no valid support is found from standard detection, a dynamic Fibonacci-based support level is projected using the most recent swing high and low — giving you a forward-looking cushion even in price discovery scenarios.
Swing Labels on Chart:
Recent Swing High and Swing Low labels are now displayed directly on the chart, helping you visually track the key zones used for projections.
Note di rilascio
New Features:Proximity Ranking Toggle – Switch between scoring-based ranking or closest-level ranking directly from the settings. This allows traders to focus on the zones most immediately relevant to price action.
Note di rilascio
bug fix in the ranking table displayScript open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.