OPEN-SOURCE SCRIPT
Telah dikemas kini 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
Nota Keluaran
# 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
Nota Keluaran
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.
Nota Keluaran
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.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.