OPEN-SOURCE SCRIPT
Relative Performance Tracker [QuantAlgo]

🟢 Overview
The Relative Performance Tracker is a multi-asset comparison tool designed to monitor and rank up to 30 different tickers simultaneously based on their relative price performance. This indicator enables traders and investors to quickly identify market leaders and laggards across their watchlist, facilitating rotation strategies, strength-based trading decisions, and cross-asset momentum analysis.

🟢 Key Features
1. Multi-Asset Monitoring
2. Ranking Tables (Up to 3 Tables)


3. Histogram Visualization

4. Customizable Color Schemes
5. Built-In Ranking Alerts
Six alert conditions detect when rankings change:
🟢 Practical Applications
→ Momentum Trading: Focus on top-ranked assets (Rank 1-10) that show strongest relative strength for trend-following strategies
→ Market Breadth Analysis: Monitor how many tickers are above vs. below zero on the histogram to gauge overall market health
→ Divergence Spotting: Identify when previously leading assets lose momentum (drop out of top ranks) as potential trend reversal signals
→ Multi-Timeframe Analysis: Use different lookback periods on different charts to align short-term and long-term relative strength
→ Customized Focus: Adjust histogram bars to show only top 5-10 strongest movers for concentrated analysis, or expand to 20-30 for comprehensive overview
The Relative Performance Tracker is a multi-asset comparison tool designed to monitor and rank up to 30 different tickers simultaneously based on their relative price performance. This indicator enables traders and investors to quickly identify market leaders and laggards across their watchlist, facilitating rotation strategies, strength-based trading decisions, and cross-asset momentum analysis.
🟢 Key Features
1. Multi-Asset Monitoring
- Track up to 30 tickers across any market (stocks, crypto, forex, commodities, indices)
- Individual enable/disable toggles for each ticker to customize your watchlist
- Universal compatibility with any TradingView symbol format (EXCHANGE:TICKER)
2. Ranking Tables (Up to 3 Tables)
- Each ticker's percentage change over your chosen lookback period, calculated as:
Pine Script® (Current Price - Past Price) / Past Price × 100 - Automatic sorting from strongest to weakest performers
- Rank: Position from 1-30 (1 = strongest performer)
- Ticker: Symbol name with color-coded background (green for gains, red for losses)
- % Change: Exact percentage with color intensity matching magnitude
- For example, Rank #1 has the highest gain among all enabled tickers, Rank #30 has the lowest (or most negative) return.
3. Histogram Visualization
- Adjustable bar count: Display anywhere from 1 to 30 top-ranked tickers (user customizable)
- Bar height = magnitude of percentage change.
- Bars extend upward for gains, downward for losses. Taller bars = larger moves.
- Green bars for positive returns, red for negative returns.
4. Customizable Color Schemes
- Classic: Traditional green/red for intuitive interpretation
- Aqua: Blue/orange combination for reduced eye strain
- Cosmic: Vibrant aqua/purple optimized for dark mode
- Custom: Full personalization of positive and negative colors
5. Built-In Ranking Alerts
Six alert conditions detect when rankings change:
🟢 Practical Applications
→ Momentum Trading: Focus on top-ranked assets (Rank 1-10) that show strongest relative strength for trend-following strategies
→ Market Breadth Analysis: Monitor how many tickers are above vs. below zero on the histogram to gauge overall market health
→ Divergence Spotting: Identify when previously leading assets lose momentum (drop out of top ranks) as potential trend reversal signals
→ Multi-Timeframe Analysis: Use different lookback periods on different charts to align short-term and long-term relative strength
→ Customized Focus: Adjust histogram bars to show only top 5-10 strongest movers for concentrated analysis, or expand to 20-30 for comprehensive overview
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
👉 Access the best tools for trading & investing here (3-day FREE trial): joinquantalgo.com/
📩 DM if you need any custom-built indicators or strategies.
📩 DM if you need any custom-built indicators or strategies.
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
👉 Access the best tools for trading & investing here (3-day FREE trial): joinquantalgo.com/
📩 DM if you need any custom-built indicators or strategies.
📩 DM if you need any custom-built indicators or strategies.
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。