OPEN-SOURCE SCRIPT
Aggiornato TRI - Smart Zones

============================================================================
# TRI - SMART ZONES v2.0
## Professional Smart Money Concepts Indicator for Pine Script v6
============================================================================
## 📊 OVERVIEW
**TRI - Smart Zones** is a comprehensive Smart Money Concepts indicator that
combines multiple institutional trading concepts into a single, powerful tool.
Built with Pine Script v6 for optimal performance and reliability.
## 🎯 CORE FEATURES
### **Fair Value Gaps (FVG)**
- **Detection**: Automatic identification of price imbalances
- **Types**: Bullish and Bearish Fair Value Gaps
- **Threshold**: Customizable gap size requirements (0.1% default)
- **Extension**: Configurable zone projection length
- **Mitigation**: Real-time tracking of gap fills
### **Order Blocks (OB)**
- **Detection**: Volume-based institutional footprint identification
- **Types**: Bullish and Bearish Order Blocks
- **Method**: Pivot-based volume analysis with configurable lookback
- **Validation**: Market structure confirmation required
- **Extension**: Adjustable zone projection
### **BSL/SSL Liquidity Levels**
- **Multi-Timeframe**: Automatic higher timeframe reference
- **Dynamic**: Real-time level updates and extensions
- **Visual**: Clear line markings with timeframe labels
- **Smart**: Adaptive timeframe selection based on current chart
### **Fibonacci Extensions**
- **ZigZag Integration**: Advanced pivot point detection
- **Levels**: Customizable Fibonacci ratios (38.2%, 61.8%, 100%, 161.8%)
- **Projection**: Dynamic extension from swing points
- **Visual**: Subtle dashed lines with level/price labels
### **Smart Dashboard**
- **Zone Statistics**: Real-time FVG and OB counts
- **Success Rates**: Mitigation percentages for each zone type
- **Market Bias**: Intelligent bullish/bearish/neutral assessment
- **Positioning**: Customizable location and size
### **Zone Analysis Engine**
- **Technical Confluence**: RSI, ADX, ATR, Volume analysis
- **VWAP Integration**: Institutional price reference
- **Confidence Scoring**: High/Mid/Low signal classification
- **Signal Arrows**: Visual trade direction indicators
## 🔔 ALERT SYSTEM
### **Market Structure Alerts**
- `Market Bias Changed` - Shift in overall market sentiment
- `BSL Touched` - Buy Side Liquidity level reached
- `SSL Touched` - Sell Side Liquidity level reached
### **Zone Touch Alerts**
- `OB Touched` - Any Order Block interaction
- `Bullish OB Touched` - Bullish Order Block touch
- `Bearish OB Touched` - Bearish Order Block touch
- `FVG Touched` - Any Fair Value Gap interaction
- `Bullish FVG Touched` - Bullish FVG touch
- `Bearish FVG Touched` - Bearish FVG touch
- `Zone Touched` - Any Smart Zone interaction
- `Bullish Zone Touched` - Any bullish zone touch
- `Bearish Zone Touched` - Any bearish zone touch
## ⚙️ CONFIGURATION
### **Zone Detection**
- Enable/disable FVG and OB detection independently
- Maximum zones per type (3-15, default: 8)
- Zone-specific threshold and extension settings
### **Visual Customization**
- Individual color schemes for each zone type
- Adjustable transparency levels
- Configurable line styles and widths
- Dashboard positioning and sizing options
### **Technical Analysis**
- RSI, ADX, ATR period customization
- Volume threshold multipliers
- Confidence level color coding
- Signal display toggle
## 🚀 PINE SCRIPT v6 OPTIMIZATIONS
- **User-Defined Types**: Structured data for zones and statistics
- **Methods**: Type-specific operations for better code organization
- **Enhanced Arrays**: Optimized memory management
- **Switch Statements**: Improved performance for zone classification
- **Error Handling**: Robust input validation and edge case management
- **Performance**: Efficient algorithms for real-time analysis
## 📈 TRADING APPLICATIONS
### **Entry Strategies**
- Zone confluence for high-probability setups
- Multi-timeframe confirmation via BSL/SSL
- Fibonacci extension targets
- Signal arrows for directional bias
### **Risk Management**
- Zone mitigation for stop-loss placement
- Market bias for position sizing
- Dashboard statistics for strategy validation
### **Market Analysis**
- Institutional footprint identification
- Liquidity level mapping
- Market structure assessment
- Trend continuation vs reversal analysis
## 🔧 TECHNICAL SPECIFICATIONS
- **Version**: Pine Script v6
- **Overlay**: True (draws on price chart)
- **Max Objects**: 100 boxes, 100 lines, 50 labels
- **Performance**: Optimized for real-time analysis
- **Compatibility**: All TradingView chart types and timeframes
# TRI - SMART ZONES v2.0
## Professional Smart Money Concepts Indicator for Pine Script v6
============================================================================
## 📊 OVERVIEW
**TRI - Smart Zones** is a comprehensive Smart Money Concepts indicator that
combines multiple institutional trading concepts into a single, powerful tool.
Built with Pine Script v6 for optimal performance and reliability.
## 🎯 CORE FEATURES
### **Fair Value Gaps (FVG)**
- **Detection**: Automatic identification of price imbalances
- **Types**: Bullish and Bearish Fair Value Gaps
- **Threshold**: Customizable gap size requirements (0.1% default)
- **Extension**: Configurable zone projection length
- **Mitigation**: Real-time tracking of gap fills
### **Order Blocks (OB)**
- **Detection**: Volume-based institutional footprint identification
- **Types**: Bullish and Bearish Order Blocks
- **Method**: Pivot-based volume analysis with configurable lookback
- **Validation**: Market structure confirmation required
- **Extension**: Adjustable zone projection
### **BSL/SSL Liquidity Levels**
- **Multi-Timeframe**: Automatic higher timeframe reference
- **Dynamic**: Real-time level updates and extensions
- **Visual**: Clear line markings with timeframe labels
- **Smart**: Adaptive timeframe selection based on current chart
### **Fibonacci Extensions**
- **ZigZag Integration**: Advanced pivot point detection
- **Levels**: Customizable Fibonacci ratios (38.2%, 61.8%, 100%, 161.8%)
- **Projection**: Dynamic extension from swing points
- **Visual**: Subtle dashed lines with level/price labels
### **Smart Dashboard**
- **Zone Statistics**: Real-time FVG and OB counts
- **Success Rates**: Mitigation percentages for each zone type
- **Market Bias**: Intelligent bullish/bearish/neutral assessment
- **Positioning**: Customizable location and size
### **Zone Analysis Engine**
- **Technical Confluence**: RSI, ADX, ATR, Volume analysis
- **VWAP Integration**: Institutional price reference
- **Confidence Scoring**: High/Mid/Low signal classification
- **Signal Arrows**: Visual trade direction indicators
## 🔔 ALERT SYSTEM
### **Market Structure Alerts**
- `Market Bias Changed` - Shift in overall market sentiment
- `BSL Touched` - Buy Side Liquidity level reached
- `SSL Touched` - Sell Side Liquidity level reached
### **Zone Touch Alerts**
- `OB Touched` - Any Order Block interaction
- `Bullish OB Touched` - Bullish Order Block touch
- `Bearish OB Touched` - Bearish Order Block touch
- `FVG Touched` - Any Fair Value Gap interaction
- `Bullish FVG Touched` - Bullish FVG touch
- `Bearish FVG Touched` - Bearish FVG touch
- `Zone Touched` - Any Smart Zone interaction
- `Bullish Zone Touched` - Any bullish zone touch
- `Bearish Zone Touched` - Any bearish zone touch
## ⚙️ CONFIGURATION
### **Zone Detection**
- Enable/disable FVG and OB detection independently
- Maximum zones per type (3-15, default: 8)
- Zone-specific threshold and extension settings
### **Visual Customization**
- Individual color schemes for each zone type
- Adjustable transparency levels
- Configurable line styles and widths
- Dashboard positioning and sizing options
### **Technical Analysis**
- RSI, ADX, ATR period customization
- Volume threshold multipliers
- Confidence level color coding
- Signal display toggle
## 🚀 PINE SCRIPT v6 OPTIMIZATIONS
- **User-Defined Types**: Structured data for zones and statistics
- **Methods**: Type-specific operations for better code organization
- **Enhanced Arrays**: Optimized memory management
- **Switch Statements**: Improved performance for zone classification
- **Error Handling**: Robust input validation and edge case management
- **Performance**: Efficient algorithms for real-time analysis
## 📈 TRADING APPLICATIONS
### **Entry Strategies**
- Zone confluence for high-probability setups
- Multi-timeframe confirmation via BSL/SSL
- Fibonacci extension targets
- Signal arrows for directional bias
### **Risk Management**
- Zone mitigation for stop-loss placement
- Market bias for position sizing
- Dashboard statistics for strategy validation
### **Market Analysis**
- Institutional footprint identification
- Liquidity level mapping
- Market structure assessment
- Trend continuation vs reversal analysis
## 🔧 TECHNICAL SPECIFICATIONS
- **Version**: Pine Script v6
- **Overlay**: True (draws on price chart)
- **Max Objects**: 100 boxes, 100 lines, 50 labels
- **Performance**: Optimized for real-time analysis
- **Compatibility**: All TradingView chart types and timeframes
Note di rilascio
# TRI - SMART ZONES INDICATOR
---
## Description
**TRI - Smart Zones** is an advanced **TradingView indicator** that combines modern technical analysis with intelligent support and resistance zones.
It automatically identifies:
- **Fair Value Gaps (FVG)**
- **Order Blocks (OB)**
...and integrates **Fibonacci analysis**, **BSL/SSL** and technical indicators to provide **high-probability trading signals**.
---
## Main Features
| Feature | Description |
|---------|-------------|
| **Smart Zone Detection** | Automatically identifies FVG and OB |
| **Technical Analysis** | RSI, MACD, ADX, CCI, VWAP, ATR with integrated analysis |
| **Fibonacci Extensions** | Extension levels based on ZigZag |
| **BSL/SSL Levels** | Break of Structure and Structure Level Lines |
| **Market Bias Analysis** | Bias calculation based on statistics |
| **Trading Signals** | Automatic signals with multiple confirmations |
| **Complete Dashboard** | Real-time statistics and insights |
---
## Technical Components
- **Fair Value Gaps (FVG):** Price gaps that create attraction zones
- **Order Blocks (OB):** Volume & pivot-based order blocks
- **ZigZag Analysis:** Automatic swing high/low identification
- **Fibonacci Extensions:** `0%`, `38.2%`, `61.8%`, `100%`, `161.8%`, etc.
- **BSL/SSL:** Structure lines to identify breaks and levels
- **Technical Alignment:** Scoring system for confluence
---
## Trading Signals
The indicator generates automatic signals when:
1. Price interacts with **smart zones** (FVG/OB)
2. Technical indicators **confirm the direction**
3. Market bias is **aligned**
4. Technical strength is **LOW / MID / HIGH**
---
## Visualization
- **Colored Zones:** Distinct bullish/bearish colors for FVG and OB
- **Fibonacci Lines:** Extension levels with labels
- **BSL/SSL Circles:** Markers for structure breaks
- **Signal Labels:** Trading entries with SL/TP
- **Dashboard:** Real-time table with statistics and bias
---
## Customizable Parameters
- **Zone Detection:** Thresholds & extensions for FVG/OB
- **Technical Analysis:** Lengths & thresholds for indicators
- **Visual Settings:** Colors, styles & sizes
- **Signal Filters:** Minimum strength & confirmations
- **Risk Management:** Customizable **Risk/Reward** ratio
---
## Dashboard Statistics
| Metric | Description |
|--------|-------------|
| **Zone Count** | Total number of zones created |
| **Mitigation Rate** | Percentage of respected zones |
| **Success Rate** | Success rate by zone type |
| **Market Bias** | BULLISH / BEARISH / NEUTRAL |
| **Active Zones** | Number of currently active zones |
---
## Advantages
- **Multi-Timeframe** analysis
- **Real-Time** updates
- **Highly Customizable**
- **Professional-grade** trading tool
- **Educational** for market structure learning
---
## Technical Notes
- Compatible with **Pine Script v6**
- Performance optimized
- Automatic memory management
- Supports multiple sessions
Note di rilascio
DESCRIPTION:Professional institutional-grade zone analysis indicator that identifies and scores
Fair Value Gaps (FVG) and Order Blocks (OB) based on multiple algorithmic factors.
KEY FEATURES:
• Directional Context Analysis (22%) - Ensures zone alignment with market trend
• Support/Resistance Proximity (20%) - Fibonacci, psychological levels, BSL/SSL, SMA200
• Momentum Analysis (18%) - RSI and ADX with directional context for optimal timing
• Volume Confirmation (16%) - Institutional participation validation
• Liquidity Analysis (12%) - Smart money positioning (BSL/SSL)
• Technical Confluence (8%) - Multi-timeframe validation
• Divergence Analysis (4%) - Momentum warning signals
ZONE SCORING SYSTEM:
• STRONG (Green triangles): ≥55% - Institutional-grade setups only
• NEUTRAL (Orange triangles): 40-54% - Professional-grade setups
• WEAK (Gray circles): <40% - Retail/avoid setups
MOMENTUM INTEGRATION:
• RSI oversold conditions (≤35) boost bullish zones regardless of trend
• RSI overbought conditions (≥65) boost bearish zones regardless of trend
• Extreme RSI (≤20, ≥80) provide 20% bonus for matching zone types
• ADX confirms trend strength and validates momentum signals
DIRECTIONAL LOGIC:
• Zones aligned with primary trend (SMA200) receive highest scores
• Counter-trend zones receive reduced but not eliminated scores
• Perfect RSI conditions can override trend penalties for bounce/rejection setups
PROFESSIONAL FILTERS:
• Age decay: Zones lose effectiveness over time (500+ bars = weak)
• Volatility filter: High ATR spikes degrade reliability
• Market bias: Considers overall smart money positioning
ALERTS:
• Strong Bull/Bear Zone: Green triangle signals with ≥55% probability score
• FVG Contact/Mitigation: Individual alerts for Fair Value Gap interactions
• OB Contact/Mitigation: Individual alerts for Order Block interactions
• Smart Zone Contact/Mitigation: Aggregated alerts for any zone interaction
• BSL/SSL Breakthrough: Liquidity level breakthrough alerts
USAGE:
Focus on GREEN triangles for highest probability setups. RSI conditions
now properly support counter-trend bounces/rejections when extreme.
Note di rilascio
DESCRIPTION:Professional institutional-grade zone analysis indicator that identifies and scores
Fair Value Gaps (FVG) and Order Blocks (OB) based on multiple algorithmic factors.
KEY FEATURES:
• Directional Context Analysis (22%) - Ensures zone alignment with market trend
• Support/Resistance Proximity (20%) - Fibonacci, psychological levels, BSL/SSL, SMA200
• Momentum Analysis (18%) - RSI and ADX with directional context for optimal timing
• Volume Confirmation (16%) - Institutional participation validation
• Liquidity Analysis (12%) - Smart money positioning (BSL/SSL)
• Technical Confluence (8%) - Multi-timeframe validation
• Divergence Analysis (4%) - Momentum warning signals
ZONE SCORING SYSTEM:
• STRONG (Green triangles): ≥55% - Institutional-grade setups only
• NEUTRAL (Orange triangles): 40-54% - Professional-grade setups
• WEAK (Gray circles): <40% - Retail/avoid setups
MOMENTUM INTEGRATION:
• RSI oversold conditions (≤35) boost bullish zones regardless of trend
• RSI overbought conditions (≥65) boost bearish zones regardless of trend
• Extreme RSI (≤20, ≥80) provide 20% bonus for matching zone types
• ADX confirms trend strength and validates momentum signals
DIRECTIONAL LOGIC:
• Zones aligned with primary trend (SMA200) receive highest scores
• Counter-trend zones receive reduced but not eliminated scores
• Perfect RSI conditions can override trend penalties for bounce/rejection setups
PROFESSIONAL FILTERS:
• Age decay: Zones lose effectiveness over time (500+ bars = weak)
• Volatility filter: High ATR spikes degrade reliability
• Market bias: Considers overall smart money positioning
ALERTS:
• Strong Bull/Bear Zone: Green triangle signals with ≥55% probability score
• FVG Contact/Mitigation: Individual alerts for Fair Value Gap interactions
• OB Contact/Mitigation: Individual alerts for Order Block interactions
• Smart Zone Contact/Mitigation: Aggregated alerts for any zone interaction
• BSL/SSL Breakthrough: Liquidity level breakthrough alerts
USAGE:
Focus on GREEN triangles for highest probability setups. RSI conditions
now properly support counter-trend bounces/rejections when extreme.
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.
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.