Display Stocks with Change%

Overview
The Display Stocks with Change% indicator is designed for TradingView to highlight specific stocks and their percentage change on a given date. The indicator allows users to input custom stock names, dates, and percentage changes, displaying relevant information directly on the chart. Additionally, it provides an option to connect the stock's high price with a label using customizable line styles.
Features
Custom Stock List: Users can input multiple stock names along with corresponding dates and percentage changes.
Date-Specific Highlighting: The script dynamically checks if the current bar's date matches any input date and displays relevant stock data.
Color-Coded Percentage Change: Stocks with a negative change are displayed in red, while positive or neutral changes are in black.
Connecting Lines: An option to enable or disable dotted, dashed, or solid lines connecting the stock's high price to the label.
Automatic Label Positioning: Adjusts label alignment based on recent price movement to avoid overlap and enhance visibility.
Input Parameters
COB (Close of Business Dates): A comma-separated list of dates in DD-MM-YYYY format.
Stock Names: A comma-separated list of stock tickers.
Change Percentage: Corresponding percentage changes for the listed stocks.
Show Connecting Lines: Boolean toggle to enable or disable connecting lines.
Line Color & Style: Customizable line color and style (solid, dotted, or dashed).
How It Works
Data Processing: The script splits user inputs into arrays and iterates through them.
Date Matching: It checks if the current bar's date matches any of the provided COB dates.
Label Formatting: When a match is found, it constructs a label containing the stock name and its percentage change.
Text Alignment & Factor Adjustments: Dynamically determines label positioning based on recent price movements.
Label Display: If any matching stocks are found, a label is created at the stock's high price.
Connecting Line (Optional): If enabled, a line is drawn from the stock’s high to the label for better visualization.
Key Benefits for Traders:
Track Multiple Stocks at Once – Displays stock names and their percentage changes on specific dates automatically.
Saves Time – No need to manually check historical data; the indicator overlays key stock movements.
Visual Insights – Labels & color coding (red for negative, black for positive) make it easy to spot trends.
Customizable & Automated – Add your own stocks, dates, and percentage changes; the script adjusts dynamically.
📌 Use Case Example:
You’re tracking MRPL, CARTRADE, and JSWENERGY on specific dates. Instead of digging through historical data, this indicator automatically highlights the stock’s movement on that date, allowing you to make faster, informed trading decisions.
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.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
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.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.