PROTECTED SOURCE SCRIPT
Custom Sector Relative Strength (sector rotation)

๐ Indicator Summary for โCustom Sector Relative Strength (sector rotation)โ
๐น Overview:
This Pine Script indicator calculates and displays the relative strength performance of up to 25 customizable sectors or ETFs compared to a user-defined benchmark index (e.g., SPY, TASI.TAD, etc.).
It helps traders and analysts identify which sectors are outperforming or underperforming relative to the benchmark over different time frames.
________________________________________
๐น Calculation Method:
For each sector, the indicator:
1. Retrieves the current and past closing prices for both the sector and the benchmark.
2. Computes the ratio of the sector's price to the benchmark at both time points.
3. Calculates the percentage change in this ratio over the selected lookback period:
4. Relative Strength (%) = ((Current_Ratio / Past_Ratio) - 1) * 100
5. Assigns a direction symbol:
o โ for positive outperformance
o โ for underperformance
o โ for no significant change
6. Applies a color code for clarity:
o Green for โ
o Red for โ
o Gray for โ
________________________________________
๐น How to Use:
1. Set your benchmark index (e.g., SPY or TASI.TAD) from the settings panel.
2. Choose a lookback period: 1 Day, 1 Week, 1 Month, 3 Months, 6 Months, or 1 Year.
3. Define up to 25 sectors:
o Enter the symbol and name of each sector.
o Toggle the Show option on/off to include/exclude any sector.
4. The script will sort the sectors from strongest to weakest based on their relative performance.
5. Results are displayed in a dynamic table on the chart showing:
o Ticker
o Sector Name
o Relative % Performance
o Direction Indicator (โ โ โ)
________________________________________
๐น Practical Uses:
โข Sector rotation strategies
โข Market breadth analysis
โข Benchmark-relative strength monitoring
โข Multi-sector ETFs or custom group comparisons
โข Saudi, US, or global sector analysis
________________________________________
Let me know if you'd like an Arabic version or want this formatted as a PDF or used as a code comment section.
๐น Overview:
This Pine Script indicator calculates and displays the relative strength performance of up to 25 customizable sectors or ETFs compared to a user-defined benchmark index (e.g., SPY, TASI.TAD, etc.).
It helps traders and analysts identify which sectors are outperforming or underperforming relative to the benchmark over different time frames.
________________________________________
๐น Calculation Method:
For each sector, the indicator:
1. Retrieves the current and past closing prices for both the sector and the benchmark.
2. Computes the ratio of the sector's price to the benchmark at both time points.
3. Calculates the percentage change in this ratio over the selected lookback period:
4. Relative Strength (%) = ((Current_Ratio / Past_Ratio) - 1) * 100
5. Assigns a direction symbol:
o โ for positive outperformance
o โ for underperformance
o โ for no significant change
6. Applies a color code for clarity:
o Green for โ
o Red for โ
o Gray for โ
________________________________________
๐น How to Use:
1. Set your benchmark index (e.g., SPY or TASI.TAD) from the settings panel.
2. Choose a lookback period: 1 Day, 1 Week, 1 Month, 3 Months, 6 Months, or 1 Year.
3. Define up to 25 sectors:
o Enter the symbol and name of each sector.
o Toggle the Show option on/off to include/exclude any sector.
4. The script will sort the sectors from strongest to weakest based on their relative performance.
5. Results are displayed in a dynamic table on the chart showing:
o Ticker
o Sector Name
o Relative % Performance
o Direction Indicator (โ โ โ)
________________________________________
๐น Practical Uses:
โข Sector rotation strategies
โข Market breadth analysis
โข Benchmark-relative strength monitoring
โข Multi-sector ETFs or custom group comparisons
โข Saudi, US, or global sector analysis
________________________________________
Let me know if you'd like an Arabic version or want this formatted as a PDF or used as a code comment section.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had โ ketahui lebih lanjut di sini.
Ahmed Amin
00201227212691
twitter.com/AhmedAmin_eg
snapchat.com/add/agmedamintc?share_id=SQYebO-s9zs&locale=en-EG
00201227212691
twitter.com/AhmedAmin_eg
snapchat.com/add/agmedamintc?share_id=SQYebO-s9zs&locale=en-EG
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 dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had โ ketahui lebih lanjut di sini.
Ahmed Amin
00201227212691
twitter.com/AhmedAmin_eg
snapchat.com/add/agmedamintc?share_id=SQYebO-s9zs&locale=en-EG
00201227212691
twitter.com/AhmedAmin_eg
snapchat.com/add/agmedamintc?share_id=SQYebO-s9zs&locale=en-EG
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.