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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.