OPEN-SOURCE SCRIPT
DF Advanced Sector & RS Analysis

DF Advanced Sector & RS Analysis
Overview
This indicator is an all-in-one dashboard designed to give you an instant "health check" on any asset. Instead of opening multiple charts to check the market trend, sector performance, and fundamentals, this tool brings all that data into a single table on your screen.
It automatically detects if you are looking at a Stock, Crypto, or Forex pair and adjusts its benchmarks accordingly.
Key Features
1. Smart Asset Detection
Stocks: Compares performance against the S&P 500 (SPY).
Crypto: Compares performance against Bitcoin (BTC).
Forex: Compares performance against the US Dollar Index (DXY).
2. Sector Intelligence (Stocks Only)
If you are trading a stock, the indicator automatically identifies its sector (e.g., Technology, Energy, Finance) and compares the stock against that specific sector ETF.
Sector Trend: Tells you if the sector is in an Uptrend or Downtrend.
vs Sector: Shows if your stock is outperforming its own industry.
3. Relative Strength (RS) & Alpha
RS Rating (0-100): A score derived from RSI logic that measures how strong the asset is compared to the benchmark. A score above 70 is bullish.
Alpha: Shows how much the asset is beating (or lagging) the market over the last 20 days.
4. Fundamental Snapshot
Growth: Displays EPS (Earnings) and Revenue growth. You can toggle these between TTM (Trailing 12 Months) for a smoother view or Quarterly for recent performance.
Valuation: Displays the P/E Ratio (TTM). This is always calculated using Trailing Twelve Month data to provide a standard valuation metric.
5. The "Verdict" Score
The indicator combines Technicals, Fundamentals, and Sector Strength into a final 0-100 Score:
STRONG (Green): High probability setup (Score > 70).
NEUTRAL (Grey): Mixed signals (Score 50-70).
RISK (Red): Weak performance or fundamentals (Score < 50).
How to Use
Add to Chart: The table will appear in the corner of your screen.
Check the Score: Look for assets with a "STRONG" verdict.
Analyze the RS: Ensure the RS Rating is high (green) to confirm the asset is a market leader.
Check the Sector: For stocks, it is safer to buy when the "Sector Trend" is UP.
Settings
Table Position: Move the dashboard to any corner of the screen.
Text Size: Adjust the size to fit your screen resolution.
Financials Mode:
TTM: Uses 12-month data (Smoother, standard for long-term analysis).
Quarterly: Uses the most recent quarter vs. the same quarter last year (More volatile, good for earnings plays).
Note: P/E Ratio is always TTM regardless of this setting.
Disclaimer
This tool is for informational purposes only and does not constitute financial advice. Always do your own research before trading.
Overview
This indicator is an all-in-one dashboard designed to give you an instant "health check" on any asset. Instead of opening multiple charts to check the market trend, sector performance, and fundamentals, this tool brings all that data into a single table on your screen.
It automatically detects if you are looking at a Stock, Crypto, or Forex pair and adjusts its benchmarks accordingly.
Key Features
1. Smart Asset Detection
Stocks: Compares performance against the S&P 500 (SPY).
Crypto: Compares performance against Bitcoin (BTC).
Forex: Compares performance against the US Dollar Index (DXY).
2. Sector Intelligence (Stocks Only)
If you are trading a stock, the indicator automatically identifies its sector (e.g., Technology, Energy, Finance) and compares the stock against that specific sector ETF.
Sector Trend: Tells you if the sector is in an Uptrend or Downtrend.
vs Sector: Shows if your stock is outperforming its own industry.
3. Relative Strength (RS) & Alpha
RS Rating (0-100): A score derived from RSI logic that measures how strong the asset is compared to the benchmark. A score above 70 is bullish.
Alpha: Shows how much the asset is beating (or lagging) the market over the last 20 days.
4. Fundamental Snapshot
Growth: Displays EPS (Earnings) and Revenue growth. You can toggle these between TTM (Trailing 12 Months) for a smoother view or Quarterly for recent performance.
Valuation: Displays the P/E Ratio (TTM). This is always calculated using Trailing Twelve Month data to provide a standard valuation metric.
5. The "Verdict" Score
The indicator combines Technicals, Fundamentals, and Sector Strength into a final 0-100 Score:
STRONG (Green): High probability setup (Score > 70).
NEUTRAL (Grey): Mixed signals (Score 50-70).
RISK (Red): Weak performance or fundamentals (Score < 50).
How to Use
Add to Chart: The table will appear in the corner of your screen.
Check the Score: Look for assets with a "STRONG" verdict.
Analyze the RS: Ensure the RS Rating is high (green) to confirm the asset is a market leader.
Check the Sector: For stocks, it is safer to buy when the "Sector Trend" is UP.
Settings
Table Position: Move the dashboard to any corner of the screen.
Text Size: Adjust the size to fit your screen resolution.
Financials Mode:
TTM: Uses 12-month data (Smoother, standard for long-term analysis).
Quarterly: Uses the most recent quarter vs. the same quarter last year (More volatile, good for earnings plays).
Note: P/E Ratio is always TTM regardless of this setting.
Disclaimer
This tool is for informational purposes only and does not constitute financial advice. Always do your own research before trading.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.