OPEN-SOURCE SCRIPT

Luxy Sector & Industry RS Analyzer

184
Ever wonder why some stocks soar while others in the same sector barely move? Or why your perfectly timed entry still loses money? Possibly the answer can be found in Relative Strength.
The Luxy Sector & Industry RS Analyzer solves a critical problem that most traders overlook: picking strong stocks in strong sectors AND strong industries. It's not enough for a stock to go up - you want stocks that are crushing their competition at both the sector AND industry level. This indicator does the heavy lifting by automatically comparing your stock against its sector ETF, industry ETF, the broader market, sector leader, and industry leader, giving you a complete multi-level picture of relative performance.

What makes this different?
- Automatic sector AND industry detection - no manual setup required
- Multi-level hierarchy analysis: Market → Sector → Industry → Stock
- Multi-timeframe analysis (1 month to 1 year) in one glance
- Industry ETF mapping (30+ industries covered)
- Clear 0-100 scoring system with letter grades (A+ to F)
- Works on stocks, crypto, forex, and commodities
- Real-time updates with anti-repaint protection

Think of it as your performance dashboard - instantly showing you if you're trading a champion or a laggard at every level of the market hierarchy.

METHODOLOGY & ATTRIBUTION

This indicator is based on classical Relative Strength (RS) analysis principles from technical analysis. RS methodology compares an asset's price performance against a benchmark to identify relative outperformance or underperformance. This concept has been used by professional traders and institutions for decades.

Key Concepts Used:
  • Relative Strength (RS) - Classical technical analysis concept measuring comparative performance
  • Multi-Level Hierarchy Analysis - Market → Sector → Industry → Stock comparison
  • Sector Rotation Analysis - Identifying which sectors are leading or lagging the market
  • Industry Rotation Analysis - Identifying which industries are leading within their sectors
  • Multi-period Performance Analysis - Evaluating strength across multiple timeframes
  • Beta Calculation - Standard statistical measure of volatility relative to a benchmark


DISCLAIMER: This indicator is for educational and informational purposes only. It should not be considered financial advice or a recommendation to buy or sell. Past performance does not guarantee future results. Trading involves risk and may not be suitable for all investors. Always do your own research and consult with a financial advisor before making investment decisions.

ảnh chụp nhanh

with all rows visible - capture when stock has strong RS score (70+) so users can see what a "good" setup looks like]

WHAT THE INDICATOR SHOWS

1. AUTOMATIC ASSET TYPE DETECTION

The indicator automatically identifies what you're analyzing and adjusts accordingly:

  • Stocks - Compares to sector ETF (XLK, XLF, XLV, etc.) and SPY
  • Crypto - Compares to Total Crypto Market Cap and Bitcoin
  • Forex - Compares to relevant currency index (DXY, EXY, etc.)
  • Commodities - Compares to Gold (GLD) as benchmark
  • Indices - Compares to broader market indices


How it works: The indicator reads your chart's asset type and ticker, then automatically maps it to the correct sector or benchmark. For stocks, it uses intelligent sector detection (looking at the sector field) to match you with the right sector ETF. For example:
- Technology stocks get compared to XLK (Technology Select Sector SPDR)
- Financial stocks get compared to XLF (Financial Select Sector SPDR)
- Healthcare stocks get compared to XLV (Health Care Select Sector SPDR)

This happens instantly when you add the indicator to any chart - no configuration needed.

2. SECTOR & MARKET BENCHMARKS

What is a Sector ETF?
A sector ETF is an exchange-traded fund that tracks a specific industry group. For example, XLK contains all major technology companies. By comparing your stock to its sector ETF, you can see if your stock is outperforming or underperforming its peers.

The indicator shows three key comparison points:

Stock vs Sector (Benchmark)
This tells you how your stock performs compared to companies in the same industry. Positive numbers mean your stock is beating the sector average. Negative numbers mean it's lagging behind.

Stock vs Market (SPY)
This shows performance against the broader S&P 500 index. This is important because even if a stock beats its sector, the entire sector might be weak. You want stocks that beat both their sector AND the market.

Sector vs Market
This reveals "sector rotation" - whether money is flowing into or out of this sector. When this number is positive, the whole sector is hot and leading the market. This is powerful because strong sectors tend to lift all boats, making it easier to find winners.

ảnh chụp nhanh

3. MULTI-PERIOD PERFORMANCE ANALYSIS

The indicator calculates performance across four timeframes simultaneously:

  • 1 Month (1M) - Recent short-term momentum
  • 3 Months (3M) - Medium-term trend strength
  • 6 Months (6M) - Longer-term positioning
  • 1 Year (1Y) - Full-cycle performance view


Why multiple periods matter:
A stock might look great over 1 month but terrible over 6 months - that's a red flag. The best stocks show consistent strength across all timeframes. When you see positive RS (Relative Strength) values across all four periods, you've found a stock with sustained outperformance.

Each row in the table shows:
- Raw performance percentage for that period
- RS value (the difference compared to benchmark)
- Color coding: Green for positive, red for negative, white for neutral

4. SECTOR LEADER COMPARISON

The indicator automatically identifies and compares your stock to the sector leader - the dominant stock in that industry.

Sector leaders by industry:
  • Technology: Apple (AAPL)
  • Healthcare: UnitedHealth (UNH)
  • Financial: JPMorgan Chase (JPM)
  • Energy: ExxonMobil (XOM)
  • Consumer Discretionary: Amazon (AMZN)
  • Consumer Staples: Walmart (WMT)
  • And more...


Why this matters:
Comparing to the leader shows you if you're trading a champion or a follower. If your stock consistently beats the sector leader, you've found something special. If it's lagging the leader, you might want to trade the leader instead.

Optional Custom Leader:
You can override the automatic leader and compare to any stock you choose. This is useful if you want to benchmark against a specific competitor or reference stock.

ảnh chụp nhanh

NEW! INDUSTRY ANALYSIS (STOCKS ONLY)

The indicator now provides multi-level analysis by automatically detecting and comparing your stock to its specific industry, not just the broad sector.

Why Industry matters:
Technology sector (XLK) contains many different industries: Software, Semiconductors, Hardware, etc. A software stock might beat the broad tech sector but lag behind other software companies. Industry analysis provides this granular view.

Industry ETF Mapping (30+ industries):
  • Software/Applications: IGV (iShares Software ETF)
  • Semiconductors: SMH (VanEck Semiconductor ETF)
  • Biotech: IBB (iShares Biotechnology ETF)
  • Pharmaceuticals: XPH (SPDR Pharmaceuticals ETF)
  • Banks: KBE (SPDR S&P Bank ETF)
  • Regional Banks: KRE (SPDR Regional Banking ETF)
  • Oil & Gas Exploration: XOP (SPDR Oil & Gas Exploration ETF)
  • Homebuilders: XHB (SPDR Homebuilders ETF)
  • Retail: XRT (SPDR S&P Retail ETF)
  • Aerospace & Defense: ITA (iShares U.S. Aerospace & Defense ETF)
  • And many more...


Industry Leader Mapping:
The indicator also identifies the leader within each industry:
  • Software: Microsoft (MSFT)
  • Semiconductors: NVIDIA (NVDA)
  • Biotech: Amgen (AMGN)
  • Pharmaceuticals: Eli Lilly (LLY)
  • Banks: JPMorgan (JPM)
  • Oil Exploration: ConocoPhillips (COP)
  • And more...


New Table Rows for Stocks:
  • Industry ETF Performance - How the specific industry performed (green background)
  • Industry Leader Performance - How the top stock in the industry performed
  • vs Industry RS - Your stock's outperformance vs its industry ETF
  • Industry vs Sector RS - Is this industry hot or cold within its sector?
  • vs Industry Leader RS - Your stock's performance vs the industry's best


Why this is powerful:
A stock that beats both its sector AND its industry is showing strength at every level. This indicates true relative strength, not just riding sector-wide momentum.

Optional Custom Industry:
You can override automatic detection for both Industry ETF and Industry Leader in settings.

5. RS SCORE & GRADING SYSTEM (0-100)

The heart of the indicator is the RS Score - a weighted calculation that distills all the performance data into one clear number from 0 to 100.

How the score is calculated:

FOR STOCKS (with Industry data):
The indicator splits the weight between Sector (60%) and Industry (40%):

SECTOR RS (60% of total weight):
  • 1 Month RS: 24% weight (40% × 0.6)
  • 3 Month RS: 18% weight (30% × 0.6)
  • 6 Month RS: 12% weight (20% × 0.6)
  • 1 Year RS: 6% weight (10% × 0.6)


INDUSTRY RS (40% of total weight):
  • 1 Month RS: 16% weight (40% × 0.4)
  • 3 Month RS: 12% weight (30% × 0.4)
  • 6 Month RS: 8% weight (20% × 0.4)
  • 1 Year RS: 4% weight (10% × 0.4)


FOR OTHER ASSETS (Crypto, Forex, Commodities):
Uses full 100% weight on benchmark:
  • 1 Month RS: 40% weight
  • 3 Month RS: 30% weight
  • 6 Month RS: 20% weight
  • 1 Year RS: 10% weight


It starts at 50 (neutral) and adds or subtracts points based on your asset's relative strength in each period.

Bonus points:
  • +5 points if the sector is outperforming the market (sector rotation is bullish)
  • +5 points if the industry is outperforming its sector (hot industry) - STOCKS ONLY
  • +5 points if RS momentum is improving (getting stronger over time)
  • -5 points if RS momentum is declining (getting weaker)


The final score is capped between 0-100.

Letter Grade System:
  • 90-100: A+ - Elite performer, crushing the sector
  • 85-89: A - Excellent, strong outperformer
  • 80-84: A- - Very good, above average
  • 75-79: B+ - Good, solid performer
  • 70-74: B - Above average, decent strength
  • 65-69: B- - Slightly above average
  • 60-64: C+ - Average, neutral strength
  • 55-59: C - Below average
  • 50-54: C- - Weak, slight underperformance
  • 45-49: D+ - Concerning weakness
  • 40-44: D - Poor, significant underperformance
  • 0-39: F - Failing, avoid this stock


What scores mean for trading:
- RS Score above 70: Strong stocks worth considering for long positions
- RS Score 50-70: Average stocks, better opportunities elsewhere
- RS Score below 50: Weak stocks, avoid or consider for shorts

ảnh chụp nhanh

6. CONSISTENCY SCORE

This metric shows what percentage of time periods show positive RS.

For STOCKS (with Industry data):
Counts both Sector RS periods AND Industry RS periods (up to 8 total periods):
- If a stock beats both sector and industry in all 4 periods each: Consistency = 100% (8/8)
- If it beats in 6 out of 8 total periods: Consistency = 75%
- If it beats in 4 out of 8 total periods: Consistency = 50%

For OTHER ASSETS:
Counts benchmark periods only (4 total):
- If it beats benchmark in all 4 periods (1M, 3M, 6M, 1Y): Consistency = 100%
- If it beats in 3 out of 4 periods: Consistency = 75%
- If it beats in 2 out of 4 periods: Consistency = 50%

Why consistency matters:
A high RS Score with low consistency might indicate a recent spike that could fade. The best stocks show both high RS Score AND high consistency - they're strong now AND have been strong historically at both the sector AND industry level.

Look for stocks with:
  • Consistency above 75%: Very reliable strength across all levels
  • Consistency 50-75%: Decent but check other metrics
  • Consistency below 50%: Weak or erratic, proceed with caution


7. BETA CALCULATION (Volatility Measure)

Beta measures how much more volatile your stock is compared to its sector.

  • Beta > 1.2: High volatility - stock moves more aggressively than sector (marked as "High")
  • Beta 0.8-1.2: Normal volatility - moves roughly in line with sector
  • Beta < 0.8: Low volatility - stock is more stable than sector (marked as "Low")


Formula used:
Beta = Correlation(Stock, Sector) × (Standard Deviation of Stock / Standard Deviation of Sector)

This uses a 20-period calculation for reliability.

How to use Beta:
- High Beta stocks offer bigger gains but also bigger risks - good for aggressive traders
- Low Beta stocks are more defensive - good for conservative positions
- Match Beta to your risk tolerance and strategy

8. DAYS ABOVE/BELOW SECTOR

This tracks consecutive periods (bars) where your stock outperforms or underperforms its sector.

Days Above Sector:
Counts how many bars in a row your stock has beaten the sector.
  • 10+ days: Strong sustained strength (shown in bright green)
  • 5-9 days: Building momentum (shown in yellow)
  • 1-4 days: Early strength (shown in white)
  • 0 days: Not currently outperforming


Days Below Sector:
Counts how many bars in a row your stock has lagged the sector.
  • 10+ days: Sustained weakness (shown in bright red)
  • 5-9 days: Losing momentum (shown in orange)
  • 1-4 days: Minor weakness (shown in white)
  • 0 days: Not underperforming (this is good!)


Why this matters:
Long streaks show trend persistence. A stock with 15+ days above sector is riding strong momentum. A stock with 15+ days below sector is in a sustained downtrend relative to peers.

ảnh chụp nhanh

9. PRICE VS 52-WEEK HIGH

Shows where current price sits relative to its 52-week high (or equivalent for your timeframe).

  • 95%+ (green): Stock is near all-time highs - strong positioning
  • 80-94% (yellow): Stock is in a pullback but still relatively strong
  • Below 80%: Stock has pulled back significantly from highs


Why this matters:
The strongest stocks stay near their highs. When you see a stock with high RS Score AND price near 52W high, you've found a stock with institutional support and strong buying pressure.

10. RELATIVE VOLUME

Compares current volume to the 20-period average volume.

  • 1.5x+ (green): High volume - significant interest and participation
  • Around 1.0x: Average volume - normal trading activity
  • Below 1.0x: Low volume - less interest or inactive period


Why volume matters:
High relative volume confirms price moves. When a stock makes a strong move on 2x or 3x normal volume, it's more likely to sustain. Low volume moves are often just noise.

11. AVERAGE RS STRENGTH

This calculates the average absolute value of all RS readings across the four timeframes.

It shows the magnitude of divergence from the sector, regardless of direction. A high number means the stock moves very differently from its sector (could be much stronger or much weaker). A low number means it tracks closely with the sector.

  • High Average RS: Stock has strong character, moves independently
  • Low Average RS: Stock follows sector closely, lacks individual strength


12. SECTOR ROTATION SIGNAL

This indicator automatically detects when a sector is experiencing bullish rotation - meaning money is flowing into the sector and it's outperforming the broader market.

Condition for bullish rotation:
Sector must be beating SPY (market) in both 1-month AND 3-month periods.

Why this matters:
Stocks in hot sectors tend to perform better because they have tailwinds from sector-wide buying. When sector rotation is bullish and your stock has a high RS Score, you've found an ideal setup.

The indicator adds +5 bonus points to the RS Score when sector rotation is bullish.

13. MOMENTUM DETECTION

The indicator compares 1-month RS to 3-month RS to detect if momentum is improving or declining.

  • RS Momentum Improving: 1M RS is better than 3M RS - stock is getting stronger (adds +5 to score)
  • RS Momentum Declining: 1M RS is worse than 3M RS - stock is getting weaker (subtracts -5 from score)


Why momentum matters:
You want to catch stocks as momentum is building, not after it's already peaked. Improving momentum suggests the strength is accelerating, not fading.

ảnh chụp nhanh

14. OVERALL ASSESSMENT & RECOMMENDATION

The indicator provides two quick summary rows:

Overall Rating:
Based on grade and RS Score, you get an instant quality rating:
  • Strong Leader (A/A+) - Top tier stock, crushing it
  • Above Average (A-/B+) - Solid performer, better than most
  • Average (B/B-) - Middle of the pack
  • Below Average (C/C+) - Struggling, watch carefully
  • Underperformer (D/F) - Weak stock, underperforming badly


Trading Signal:
Combines multiple factors to give setup quality:

  • STRONG BUY SETUP - RS Score 70+, Consistency 75+, AND sector rotation bullish. This is the perfect storm - strong stock, consistent strength, hot sector.
  • BULLISH - RS Score 60+, Consistency 50+. Good quality stock worth considering.
  • NEUTRAL - RS Score 50+. Okay but not exciting, better opportunities exist.
  • WEAK - RS Score 40-49. Below average, risky.
  • AVOID - RS Score below 40. Stay away, too weak.


IMPORTANT: These are educational signals only, not financial advice. Always do your own analysis and risk management.

KEY FEATURES

1. AUTOMATIC EVERYTHING
- Auto-detects asset type (stock, crypto, forex, commodity, index)
- Auto-maps stocks to correct sector ETF (11 sectors covered)
- Auto-maps stocks to correct industry ETF (30+ industries covered)
- Auto-identifies sector leader AND industry leader
- Auto-selects appropriate market benchmark
- Zero configuration required - just add to chart

2. MULTI-ASSET SUPPORT
Works on all asset classes:
  • US Stocks - Compares to sector ETFs (XLK, XLF, XLV, etc.)
  • Crypto - Compares to Total Crypto Market Cap
  • Forex - Compares to currency indices (DXY, EXY, etc.)
  • Commodities - Compares to Gold (GLD)
  • Indices - Compares to broader market benchmarks


3. FLEXIBLE DISPLAY
  • 9 table positions (top/middle/bottom, left/center/right)
  • 4 size options (tiny, small, normal, large)
  • Show/hide table completely
  • Real-time indicator toggle


4. TIMEFRAME FLEXIBILITY
Choose your analysis timeframe:
  • Chart Timeframe (default) - Uses whatever timeframe your chart is on
  • Fixed: 1 Hour, 4 Hours, Daily, Weekly - Forces calculations to specific timeframe


This means you can be on a 5-minute chart but analyze RS on Daily timeframe if you prefer.

5. RS SCORE FILTERING
Set a minimum RS Score threshold to only see strong stocks:
  • Set to 0 - Shows all stocks
  • Set to 70 - Only displays stocks with RS Score 70+ (strong stocks only)
  • Warning message displays if stock doesn't meet threshold


Perfect for screening - quickly scan multiple charts and the indicator only shows tables for stocks that pass your quality filter.

6. CUSTOM LEADER COMPARISON
Override automatic leader detection:
  • Compare to any ticker you choose
  • Benchmark against specific competitors
  • Use your own reference stocks


7. COMPREHENSIVE TOOLTIPS
Every input parameter and every table row has detailed tooltips explaining:
  • What the metric measures
  • How to interpret the values
  • What thresholds indicate strength/weakness
  • Why it matters for trading


Hover over any element to learn - it's like having a trading coach built in.

8. SMART ALERTS

Built-in alert system for key events:

Divergence Alerts:
Get notified when your stock diverges significantly from its sector.
  • Bullish Divergence: Stock beating sector by threshold percentage
  • Bearish Divergence: Stock losing to sector by threshold percentage


Set your threshold (default 5%) - this determines how big a divergence triggers the alert.

RS Score Alerts:
Get notified when RS Score crosses your threshold:
  • Crossed Above: RS Score went from below to above your threshold (bullish)
  • Crossed Below: RS Score dropped from above to below threshold (bearish)


Set your threshold (default 70) to focus on strong stocks.

Sector Rotation Alert:
Fires when sector shows bullish rotation (outperforming market).

ảnh chụp nhanh

HOW TO USE THE INDICATOR

FOR SWING TRADERS:

1. Add indicator to your watchlist stocks
2. Look for RS Score 70+ with Consistency 75%+
3. Check if sector rotation is bullish (bonus!)
4. Verify price is near 52W high (95%+)
5. Wait for entry setup on your chart
6. Use stop loss below key support

Example Setup:
Stock shows:
- RS Score: 82 (Grade: A-)
- Consistency: 100% (strong across all periods)
- Sector Rotation: Bullish
- Price vs 52W High: 96%
- Days Above Sector: 12 days
- Relative Volume: 1.8x

This is a textbook strong stock in a hot sector near highs - ideal for swing long.

FOR POSITION TRADERS:

1. Focus on 6-month and 1-year RS values
2. Look for sustained outperformance (Consistency 75%+)
3. Prefer lower Beta stocks (less volatility)
4. Check Days Above Sector for trend persistence
5. Monitor RS Score monthly, exit if drops below 60

FOR ACTIVE TRADERS:

1. Use on intraday timeframes (1H or 4H)
2. Set RS Score filter to 60+ for quick screening
3. Enable Divergence Alerts
4. Watch for momentum improving signal
5. Higher Beta stocks offer more movement

FOR SHORT SELLERS:

1. Look for RS Score below 40 (Grade: D or F)
2. Check for declining momentum
3. Verify Days Below Sector is increasing (10+)
4. Sector rotation should be bearish
5. Price should be well off 52W high

WHAT MAKES A PERFECT SETUP:

The holy grail combination:
  • RS Score: 75+ (A- or better)
  • Consistency: 80%+ (strong across time - beats sector AND industry)
  • Sector Rotation: Bullish (hot sector)
  • Industry vs Sector: Positive (hot industry within sector)
  • Days Above Sector: 10+ (sustained strength)
  • Momentum: Improving (getting stronger)
  • Price vs 52W High: 90%+ (near highs)
  • Relative Volume: 1.5x+ (volume confirmation)


When you find this combination, you've located a stock with every advantage in its favor - strong at the stock level, industry level, AND sector level. That's multi-level confirmation of relative strength.

IMPORTANT NOTES

Data Reliability:
  • All calculations use lookahead=off for anti-repaint protection
  • Historical values will never change
  • Real-time indicator toggle only affects the visual clock icon, not data reliability
  • All security requests are properly configured to prevent future data leakage


Sector Mapping Notes:
  • Sector detection uses TradingView's sector field
  • Some stocks may not have sector data - indicator will adapt
  • Sector ETFs used: XLK, XLF, XLV, XLE, XLY, XLP, XLI, XLB, XLRE, XLU, XLC
  • Major market ETFs (SPY, QQQ, DIA) are treated as market benchmarks, not stocks


Multi-Asset Notes:
  • Crypto compares to CRYPTOCAP:TOTAL (total crypto market cap)
  • Forex compares to relevant currency index based on base currency
  • Commodities compare to Gold (GLD) as primary commodity benchmark
  • Custom leaders can be set for any asset type


FREQUENTLY ASKED QUESTIONS

Q: What does RS Score of 75 actually mean?
A: It means your stock is strongly outperforming its sector across multiple timeframes. The score is weighted toward recent performance (1-month gets 40% weight), so 75 indicates sustained relative strength with emphasis on current momentum.

Q: My stock has high RS Score but is going down. Why?
A: RS Score measures relative performance (vs sector/market), not absolute price direction. A stock can fall 5% while its sector falls 10% - that's still positive relative strength. In bear markets or sector corrections, high RS stocks often fall less than peers.

Q: Should I only trade stocks with RS Score above 70?
A: For long positions, yes - focus on 70+ scores. These stocks have proven they can beat their sector. However, for pairs trading or relative value plays, you might also short stocks with scores below 40 while longing stocks above 70.

Q: What if my stock doesn't have a sector?
A: The indicator handles this gracefully. If no sector is detected, it will compare directly to the market (SPY for stocks). Some rows may show N/A, but the indicator will still provide useful market-relative data.

Q: Why does the sector sometimes show N/A?
A: This happens when: 1) Your asset has no sector classification, 2) The stock IS the sector ETF itself, 3) You're analyzing a non-stock asset (crypto, forex, commodity). The indicator adapts by focusing on market-relative metrics instead.

Q: Can I use this on cryptocurrencies?
A: Yes! The indicator automatically detects crypto and compares to the Total Crypto Market Cap (CRYPTOCAP:TOTAL). You can also set a custom leader like Bitcoin (BTCUSD) to compare against the dominant crypto.

Q: What's the difference between RS Score and Consistency?
A: RS Score is the weighted average of how much you're beating the sector (magnitude). Consistency is what percentage of time periods show outperformance (reliability). You want both high - that means strong AND consistent.

Q: Do the alerts repaint?
A: No. All alerts fire only on bar close (barstate.isconfirmed) and use properly configured data with lookahead=off. Once an alert fires, it's final and won't change.

Q: What timeframe should I use?
A: For swing trading: Daily or Weekly. For day trading: 1H or 4H. For position trading: Weekly. Use "Chart Timeframe" mode and switch your chart timeframe to change the analysis period easily.

Q: Why is Days Above Sector showing 0?
A: This means your stock is not currently outperforming its sector. If Days Below Sector is also 0, it means the RS is exactly neutral (very rare). Check the actual RS values to see current standing.

Q: Can I compare to a different market benchmark than SPY?
A: Currently the indicator uses SPY (S&P 500) as the default US stock market benchmark. For crypto it uses CRYPTOCAP:TOTAL, for forex it uses currency indices, etc. The benchmark auto-adjusts based on asset type.

Q: What's a good Beta value?
A: It depends on your strategy. Aggressive traders prefer Beta above 1.2 (more volatility = bigger moves). Conservative traders prefer Beta 0.8-1.0 (more stable). Beta is neutral - it's about matching your risk tolerance.

Q: How often does the table update?
A: With Real-time Indicator enabled: Every tick (constant updates). With it disabled: Only on bar close. Either way, the underlying data is identical and non-repainting - the toggle only affects update frequency and the clock icon display.

Q: My stock is showing "AVOID" but it's up 50% this year. Is the indicator wrong?
A: Not necessarily. The indicator measures RELATIVE performance. If your stock is up 50% but the sector is up 100%, your stock is actually underperforming by 50%. The indicator helps you identify when you should switch to stronger stocks in the same sector.

Q: What does "Strong Buy Setup" really mean?
A: It means three things aligned: 1) RS Score above 70 (strong stock), 2) Consistency above 75% (reliable strength), 3) Sector rotation is bullish (hot sector). This combination historically correlates with stocks that continue outperforming. However, this is NOT financial advice - always do your own analysis.

Q: Can I use this for options trading?
A: Yes! High RS Score stocks make good candidates for call options (bullish bets) while low RS Score stocks may work for puts (bearish bets). Higher Beta stocks will have more volatile options (higher premiums but more movement).

Q: Why is my crypto showing N/A for sector?
A: Cryptocurrencies don't have "sectors" like stocks do. Instead, the indicator compares crypto to the total crypto market cap. This is normal and expected behavior.

Q: What happens if I'm analyzing an ETF?
A: If you're analyzing a sector ETF (like XLK), it will compare to SPY (market). If you're analyzing SPY itself, some comparisons won't be available (can't compare SPY to itself). The indicator intelligently adapts to avoid circular comparisons.

Q: What if my stock doesn't have industry data?
A: Not all stocks are mapped to specific industries (only 30+ major industries are covered). If no industry is detected, the indicator will still work using only sector analysis. The RS Score calculation will use 100% sector weight instead of the 60%/40% split.

Q: Why does Industry vs Sector matter?
A: Industry vs Sector shows if your specific industry is hot or cold within its broader sector. For example, Semiconductors (SMH) might be outperforming Technology sector (XLK) even though both are up. This helps you find not just strong sectors, but the strongest industries within those sectors.

Q: Can I disable Industry analysis?
A: Yes! In the "Industry Analysis" settings group, you can toggle off "Show Industry Analysis in Table" to hide all industry rows. However, even when hidden, industry data still contributes to the RS Score calculation for stocks.

Q: Why is my Consistency Score lower for stocks than other assets?
A: For stocks with industry data, Consistency counts 8 periods (4 Sector + 4 Industry periods) instead of just 4. This means the bar is higher - your stock needs to beat both sector AND industry consistently. A stock that beats sector in all 4 periods but lags industry in 2 periods will show 75% consistency (6/8), not 100%.

BEST PRACTICES

  1. Use as a screening tool - Set RS Score filter to 70+ and quickly scan your watchlist. Only strong stocks will show the table.
  2. Combine with technical analysis - RS Score tells you WHAT to trade, your chart tells you WHEN to enter.
  3. Check multiple timeframes - Switch between Daily and Weekly to see if strength holds across different time horizons.
  4. Monitor sector rotation - When sector goes from bearish to bullish rotation, it's often a great time to enter stocks in that sector.
  5. Watch Industry vs Sector - Stocks in hot industries within hot sectors have double tailwinds. Prioritize Industry vs Sector positive values.
  6. Pay attention to consistency - High RS Score with low consistency might be a spike that fades. Look for 70%+ consistency across BOTH sector and industry.
  7. Use the leader comparison - If your stock consistently beats both sector leader AND industry leader, you may have found the next champion.
  8. Watch days above/below sector - Long streaks (15+ days) indicate strong trends. Look for these in conjunction with high RS Score.
  9. Set alerts on key stocks - Enable RS Score alerts at 70 threshold to get notified when watchlist stocks become strong.
  10. Consider Beta for position sizing - Size smaller positions in high Beta stocks, larger in low Beta stocks for balanced risk.
  11. Exit when RS Score drops - If a stock's RS Score falls below 60, consider reducing or exiting - the strength may be fading.
  12. Leverage industry-level insight - If Industry ETF is weak but stock is strong, that's standout strength. If Industry is hot but stock is lagging, consider switching to the industry leader instead.


SETTINGS EXPLAINED

Display Settings:
  • Show Performance Table - Master on/off switch for the table
  • Table Position - 9 positions available (corners, edges, center)
  • Table Size - 4 sizes (tiny, small, normal, large) for different screen sizes


Timeframe Settings:
  • Chart Timeframe (recommended) - Dynamic, uses whatever chart TF you're on
  • Fixed Timeframes - Locks analysis to 1H, 4H, Daily, or Weekly regardless of chart


Filtering Settings:
  • Minimum RS Score - Set threshold (0-100) for displaying table
  • Show Warning - When enabled, displays message if stock doesn't meet filter


Alert Settings:
  • Divergence Alerts - Enable alerts when stock diverges from sector
  • Threshold (%) - How big a divergence triggers alert (default 5%)
  • RS Score Alerts - Enable alerts when RS Score crosses threshold
  • Threshold - What RS Score level triggers alert (default 70)


Sector Analysis Settings:
  • Use Custom Sector ETF - Override automatic sector ETF detection
  • Sector ETF Symbol - Enter any sector ETF to compare against
  • Use Custom Sector Leader - Override automatic sector leader detection
  • Sector Leader Symbol - Enter any ticker as sector leader


Industry Analysis Settings:
  • Use Custom Industry ETF - Override automatic industry ETF detection
  • Industry ETF Symbol - Enter specific industry ETF (e.g., IGV, SMH)
  • Use Custom Industry Leader - Override automatic industry leader detection
  • Industry Leader Symbol - Enter specific industry leader
  • Show Industry Analysis - Toggle all industry rows on/off


Display Settings:
  • Show Real-time Indicator - Toggle clock icon in header (doesn't affect data)


WHAT THIS INDICATOR DOESN'T DO

To set proper expectations:

  • Does NOT provide entry/exit signals - this is a strength analyzer, not a trading system
  • Does NOT predict future price movement - shows current and historical relative strength
  • Does NOT guarantee profits - strong RS stocks can still decline
  • Does NOT replace your own analysis - use as one tool among many
  • Does NOT work on stocks with no sector data - will adapt but some rows show N/A


This indicator is a decision support tool. It helps you identify which stocks are showing relative strength so you can make more informed trading decisions. You still need your own entry strategy, risk management, and position sizing rules.

SUPPORT & CONTACT

Questions or feedback? Use the comments section below or send me a message.

If you find this indicator useful, please give it a boost and share with other traders who might benefit from relative strength analysis.



FINAL REMINDER

This indicator is a tool for analyzing relative strength - it shows you which stocks are outperforming their sector and market. It does NOT provide financial advice or trade signals. Always conduct your own research, manage your risk appropriately, and consult with a financial advisor before making investment decisions.

Past performance of relative strength does not guarantee future results. Strong stocks can become weak, and sectors rotate in and out of favor. Use this indicator as part of a comprehensive trading strategy, not as a standalone decision-making system.

Trade smart, manage risk, and may your RS Scores stay high!
If you got till here and you like my work a BOOST and a COMMENT would make me happy

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.