PROTECTED SOURCE SCRIPT
Обновлено Valuation 2.0

Valuation 2.0 Indicator
The Valuation 2.0 indicator is a powerful and customizable tool designed for traders seeking to assess the relative valuation of an asset against up to four correlated instruments (e.g., DXY, GC1!, ZB1!, or sector ETFs like XLK). Built on the principles of Larry Williams' valuation methods, it provides a visual and data-driven approach to identify overvalued ("Caro") and undervalued ("Barato") conditions, helping traders make informed decisions across various markets such as forex, commodities, bonds, or equities.
Key Features
1. Relative Valuation Calculation
Core Mechanism: Calculates a valuation index by comparing the asset's price to correlated instruments using a ratio-based formula, normalized between 0 and 100.
EMA-Based Smoothing: Utilizes short-term (default: 2 periods) and long-term (default: 22 periods) Exponential Moving Averages (EMAs) to derive a relative valuation index, with a lookback period of 156 bars (approximately 3 years of weekly data) for normalization.
Custom Timeframe: Option to use a custom timeframe (e.g., weekly) or the chart's default timeframe for calculations.
2. Flexible Asset Selection
Supports up to four correlated instruments (default: DXY, GC1!, ZB1!, with the fourth slot disabled by default for sector ETFs like XLK).
Users can enable/disable each instrument individually via the "Inputs" tab, allowing tailored analysis for specific markets or strategies.
3. Customizable Valuation Levels
Manual Levels: Fixed thresholds for overvaluation (85 and 95), undervaluation (15 and 5), neutral (50), and intermediate levels (67.5 and 32.5) for consistent analysis.
Automatic Levels: Dynamically calculated levels based on recent price action, using a lookback period (default: 50 bars) and customizable multipliers for adaptability to market conditions.
Visual Feedback: Levels are plotted as horizontal lines with customizable colors and opacities, and overvaluation/undervaluation zones are filled for quick visual interpretation.
4. Informative Table
Displays a table summarizing each active instrument's details:
Columns: Asset (ticker), Value (current valuation index), Status ("Caro" for overvalued, "Barato" for undervalued, "Normal" otherwise), and Color (visual indicator).
Footer Count: Shows the number of active instruments in overvalued ("Caro: X of Y") or undervalued ("Barato: Z of Y") states, only displaying counts greater than 0 for clarity.
Customization: Adjustable table position (default: Top Right), text size (default: Small), header color, and text color via the "Inputs" tab.
5. Visual Styling
Index Lines: Each instrument's valuation index is plotted with distinct colors for overvalued (#FF0000), undervalued (#16e520), and normal states (customizable, default: #9C27B0 for Index 1, #FF9800 for Index 2, #FFFFFF for Index 3).
Levels and Zones:
Overvaluation Level 1: #f23645
Overvaluation Level 2: #2962ff (60% opacity)
Undervaluation Level 1: #4caf50
Undervaluation Level 2: #2962ff (60% opacity)
Neutral Level: #b8b8b8 (50% opacity)
Intermediate Levels: #3d3d3d (90% opacity)
Overvaluation Zone: #f23645 (10% opacity)
Undervaluation Zone: #4caf50 (10% opacity)
All colors and opacities are editable in the "Style" tab for personalized visualization.
6. Use Cases
Cross-Market Analysis: Ideal for comparing an asset's valuation against indices, commodities, or bonds (e.g., analyzing BTC against DXY, GC1!, and ZB1!).
Sector ETF Integration: Supports sector ETFs (e.g., XLK for tech stocks) to assess relative performance within a sector.
Multi-Timeframe Flexibility: Suitable for day traders, swing traders, or long-term investors by adjusting the timeframe and lookback parameters.
How to Use
Add to Chart: Apply the indicator to any chart in TradingView.
Configure Inputs:
Select correlated instruments in the "Seleção de Ativos" section (default: DXY, GC1!, ZB1!).
Choose manual or automatic levels in the "Níveis de Valuation" section.
Adjust table settings (position, text size, colors) in the "Configurações de Tabela" section.
Customize Style: Modify colors and opacities for index lines, levels, and zones in the "Style" tab.
Interpret Results:
Monitor the plotted lines for each instrument to identify overvalued (>85 or dynamic) or undervalued (<15 or dynamic) conditions.
Use the table for a quick overview of each instrument's status and the footer count for a summary of overvalued/undervalued assets.
Notes
Default Settings: Optimized for three active instruments (DXY, GC1!, ZB1!) with the fourth (ETF) disabled, but fully customizable.
Performance: Designed to compile efficiently in Pine Script v6, with no external dependencies.
Best Practices: Test the indicator on your preferred assets and timeframes to fine-tune levels and multipliers for optimal results.
Enjoy the Valuation 2.0 indicator, and enhance your trading strategy with precise, visually intuitive valuation insights! 🚀
The Valuation 2.0 indicator is a powerful and customizable tool designed for traders seeking to assess the relative valuation of an asset against up to four correlated instruments (e.g., DXY, GC1!, ZB1!, or sector ETFs like XLK). Built on the principles of Larry Williams' valuation methods, it provides a visual and data-driven approach to identify overvalued ("Caro") and undervalued ("Barato") conditions, helping traders make informed decisions across various markets such as forex, commodities, bonds, or equities.
Key Features
1. Relative Valuation Calculation
Core Mechanism: Calculates a valuation index by comparing the asset's price to correlated instruments using a ratio-based formula, normalized between 0 and 100.
EMA-Based Smoothing: Utilizes short-term (default: 2 periods) and long-term (default: 22 periods) Exponential Moving Averages (EMAs) to derive a relative valuation index, with a lookback period of 156 bars (approximately 3 years of weekly data) for normalization.
Custom Timeframe: Option to use a custom timeframe (e.g., weekly) or the chart's default timeframe for calculations.
2. Flexible Asset Selection
Supports up to four correlated instruments (default: DXY, GC1!, ZB1!, with the fourth slot disabled by default for sector ETFs like XLK).
Users can enable/disable each instrument individually via the "Inputs" tab, allowing tailored analysis for specific markets or strategies.
3. Customizable Valuation Levels
Manual Levels: Fixed thresholds for overvaluation (85 and 95), undervaluation (15 and 5), neutral (50), and intermediate levels (67.5 and 32.5) for consistent analysis.
Automatic Levels: Dynamically calculated levels based on recent price action, using a lookback period (default: 50 bars) and customizable multipliers for adaptability to market conditions.
Visual Feedback: Levels are plotted as horizontal lines with customizable colors and opacities, and overvaluation/undervaluation zones are filled for quick visual interpretation.
4. Informative Table
Displays a table summarizing each active instrument's details:
Columns: Asset (ticker), Value (current valuation index), Status ("Caro" for overvalued, "Barato" for undervalued, "Normal" otherwise), and Color (visual indicator).
Footer Count: Shows the number of active instruments in overvalued ("Caro: X of Y") or undervalued ("Barato: Z of Y") states, only displaying counts greater than 0 for clarity.
Customization: Adjustable table position (default: Top Right), text size (default: Small), header color, and text color via the "Inputs" tab.
5. Visual Styling
Index Lines: Each instrument's valuation index is plotted with distinct colors for overvalued (#FF0000), undervalued (#16e520), and normal states (customizable, default: #9C27B0 for Index 1, #FF9800 for Index 2, #FFFFFF for Index 3).
Levels and Zones:
Overvaluation Level 1: #f23645
Overvaluation Level 2: #2962ff (60% opacity)
Undervaluation Level 1: #4caf50
Undervaluation Level 2: #2962ff (60% opacity)
Neutral Level: #b8b8b8 (50% opacity)
Intermediate Levels: #3d3d3d (90% opacity)
Overvaluation Zone: #f23645 (10% opacity)
Undervaluation Zone: #4caf50 (10% opacity)
All colors and opacities are editable in the "Style" tab for personalized visualization.
6. Use Cases
Cross-Market Analysis: Ideal for comparing an asset's valuation against indices, commodities, or bonds (e.g., analyzing BTC against DXY, GC1!, and ZB1!).
Sector ETF Integration: Supports sector ETFs (e.g., XLK for tech stocks) to assess relative performance within a sector.
Multi-Timeframe Flexibility: Suitable for day traders, swing traders, or long-term investors by adjusting the timeframe and lookback parameters.
How to Use
Add to Chart: Apply the indicator to any chart in TradingView.
Configure Inputs:
Select correlated instruments in the "Seleção de Ativos" section (default: DXY, GC1!, ZB1!).
Choose manual or automatic levels in the "Níveis de Valuation" section.
Adjust table settings (position, text size, colors) in the "Configurações de Tabela" section.
Customize Style: Modify colors and opacities for index lines, levels, and zones in the "Style" tab.
Interpret Results:
Monitor the plotted lines for each instrument to identify overvalued (>85 or dynamic) or undervalued (<15 or dynamic) conditions.
Use the table for a quick overview of each instrument's status and the footer count for a summary of overvalued/undervalued assets.
Notes
Default Settings: Optimized for three active instruments (DXY, GC1!, ZB1!) with the fourth (ETF) disabled, but fully customizable.
Performance: Designed to compile efficiently in Pine Script v6, with no external dependencies.
Best Practices: Test the indicator on your preferred assets and timeframes to fine-tune levels and multipliers for optimal results.
Enjoy the Valuation 2.0 indicator, and enhance your trading strategy with precise, visually intuitive valuation insights! 🚀
Информация о релизе
**Version 2.0 - ETF Information Enhancement**Added comprehensive ETF reference system to help users identify sector-specific and commodity ETFs for correlation analysis:
- **Interactive ETF Reference Table**: Optional on-chart table displaying detailed ETF information across multiple categories (S&P 500 Sectors, Metals, Energy, Grains, Softs, Livestock)
- **Enhanced Tooltips**: Asset 4 input now includes quick-reference tooltip with major sector ETFs and commodity categories
- **Customizable Display**: Users can toggle the reference table, select specific categories, and position it anywhere on the chart
- **Complete Coverage**: Includes 11 S&P 500 sector ETFs (XLC, XLY, XLP, XLE, XLF, XLV, XLI, XLB, XLRE, XLK, XLU) and commodity ETFs for metals, energy, grains, softs, and livestock
- **User-Friendly**: All ETF information accessible directly within the indicator settings without leaving TradingView
This update makes it easier to select appropriate correlation assets for valuation analysis by providing instant access to relevant ETF tickers and their corresponding sectors or commodities.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.