OPEN-SOURCE SCRIPT
Aggiornato

Dual Custom Index with Spread

202
Dual Custom Index with Spread

Create powerful custom indices from any instruments and analyze their relative strength dynamics

Overview
This advanced indicator allows you to build two completely customizable indices from your choice of instruments and analyze their spread relationship. Perfect for inter-market analysis, sector rotation strategies, currency strength comparisons, and sophisticated relative performance studies.

Key Features
🔧 Fully Customizable Index Construction

Build each index from up to 6 instruments with individual weightings
Enable/disable instruments on the fly without losing settings
Automatic weight validation ensures mathematically accurate calculations
Invert functionality for instruments that move opposite to index strength

📊 Advanced ADX-Based Methodology

Uses sophisticated ADX +DI/-DI directional bias calculations
Normalized bias calculation for consistent scaling across different instruments
Optimized default settings for intraday trading with full customization options
Professional-grade smoothing and filtering options

📈 Dual Analysis Modes

Difference Mode: Shows absolute strength difference (Index1 - Index2)
Ratio Mode: Shows relative performance ratio (Index1 / Index2)
Additional spread smoothing for cleaner signals

🎨 Professional Display Options

Custom labels with full color, size, and positioning control
Dynamic "Follow Line" labels that move with your data
Static corner positioning for reference displays
Clean error messaging and validation feedback

Use Cases
Gold Trading: Create gold strength vs USD strength indices for precise market timing
Sector Analysis: Compare technology vs financial sector strength for rotation strategies
Currency Strength: Build custom currency baskets for advanced forex analysis
Commodity Spreads: Analyze relative strength between different commodity groups
Regional Markets: Compare strength between different geographical market indices
Crypto Analysis: Track relative performance between different cryptocurrency sectors

Technical Specifications

Instruments per Index: Up to 6 with individual enable/disable
Weight Validation: Automatic 100% total weight enforcement
Calculation Method: ADX-based directional bias with trend strength weighting
Smoothing Options: Multiple levels of customizable smoothing
Error Handling: Professional validation with clear user feedback

Optimization Tips

Intraday Trading: Use DI Length 3-7 for faster response
Daily Analysis: Use DI Length 10-14 for smoother signals
Noisy Markets: Increase Final Smoothing for cleaner signals
Trending Markets: Lower smoothing values for faster reaction

Perfect for traders who need sophisticated inter-market analysis tools beyond standard indicators. Whether you're analyzing gold vs dollar dynamics, sector rotation opportunities, or custom currency strength relationships, this indicator provides institutional-grade analysis capabilities with complete customization flexibility.
Note di rilascio
.
Note di rilascio
.
Note di rilascio
- Made it so the fill between Index 1 and Index 2 dynamically changes colour to indicate/visualise bullish or bearish conditions based on the spread differential between the two indexes.
Note di rilascio
- added settings so users can adjust index/spread line colours.

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.