OPEN-SOURCE SCRIPT
Super Performance

The "Super Performance" script is a custom indicator written in Pine Script (version 6) for use on the TradingView platform. Its main purpose is to visually compare the performance of a selected stock or index against a benchmark index (default: NIFTYMIDSML400) over various timeframes, and to display sector-wise performance rankings in a clear, tabular format.
Key Features:
Customizable Display:
Users can toggle between dark and light color themes, enable or disable extended data columns, and choose between a compact "Mini Mode" or a full-featured table view. Table positions and sizes are also configurable for both stock and sector tables.
Performance Calculation:
The script calculates percentage price changes for the selected stock and the benchmark index over multiple periods: 1, 5, 10, 20, 50, and 200 days. It then checks if the stock is outperforming the index for each period.
Conviction Score:
For each period where the stock outperforms the index, a "conviction score" is incremented. This score is mapped to qualitative labels such as "Super solid," "Solid," "Good," etc., and is color-coded for quick visual interpretation.
Sector Performance Table:
The script tracks 19 sector indices (e.g., REALTY, IT, PHARMA, AUTO, ENERGY) and calculates their performance over 1, 5, 10, 20, and 60-day periods. It then ranks the top 5 performing sectors for each timeframe and displays them in a sector performance table.
Visual Output:
Two tables are constructed:
Stock Performance Table: Shows the stock's returns, index returns, outperformance markers (✔/✖), and the difference for each period, along with the overall conviction score.
Sector Performance Table: Ranks and displays the top 5 sectors for each timeframe, with color-coded performance values for easy comparison.
Key Features:
Customizable Display:
Users can toggle between dark and light color themes, enable or disable extended data columns, and choose between a compact "Mini Mode" or a full-featured table view. Table positions and sizes are also configurable for both stock and sector tables.
Performance Calculation:
The script calculates percentage price changes for the selected stock and the benchmark index over multiple periods: 1, 5, 10, 20, 50, and 200 days. It then checks if the stock is outperforming the index for each period.
Conviction Score:
For each period where the stock outperforms the index, a "conviction score" is incremented. This score is mapped to qualitative labels such as "Super solid," "Solid," "Good," etc., and is color-coded for quick visual interpretation.
Sector Performance Table:
The script tracks 19 sector indices (e.g., REALTY, IT, PHARMA, AUTO, ENERGY) and calculates their performance over 1, 5, 10, 20, and 60-day periods. It then ranks the top 5 performing sectors for each timeframe and displays them in a sector performance table.
Visual Output:
Two tables are constructed:
Stock Performance Table: Shows the stock's returns, index returns, outperformance markers (✔/✖), and the difference for each period, along with the overall conviction score.
Sector Performance Table: Ranks and displays the top 5 sectors for each timeframe, with color-coded performance values for easy comparison.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
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 sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
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.