OPEN-SOURCE SCRIPT
Stock Reference Data - Daily

Description
A compact, on-chart reference panel for stocks. Shows 20-day average volume, ATR (14), and ATR as a percentage of price in a fully configurable table, and drops an "📊 Earnings" label on bars where an earnings release occurred. Designed for the daily timeframe.
How it works
The indicator computes three metrics on every bar and renders them in a table on the most recent bar:
20 Day Avg Vol — A 20-period simple moving average of volume, formatted with K / M / B suffixes for readability.
ATR (14) — Pine's built-in 14-period Average True Range, the standard short-term volatility measure.
ATR % — ATR(14) expressed as a percentage of the current close. This normalizes volatility across stocks at different price levels, so you can compare a $20 stock and a $400 stock on equal footing.
Separately, the indicator calls request.earnings() to detect bars where an earnings event was reported. When one is found on the most recent bar, an orange "📊 Earnings" label is placed above the bar's high.
The table is created once and updated only on the last bar (barstate.islast), so there is no historical clutter and no per-bar drawing overhead.
Inputs
Table Position — Vertical (top / middle / bottom) and Horizontal (left / center / right). All 9 placements are supported.
Table Appearance — Background color, font color, and font size (tiny / small / normal / large / huge).
Recommended usage
Apply on a daily chart. Best paired with a price-action or trend setup where you want quick context on liquidity (volume), volatility (ATR / ATR %), and event risk (earnings).
Release notes — v1.1
Added configurable table position — vertical (top / middle / bottom) and horizontal (left / center / right), giving 9 placement options.
Added configurable background color, font color, and font size.
Removed the Market Cap row from the table.
Renamed the indicator to "Stock Reference Data - Daily" to reflect its intended timeframe.
Refactored position and size mapping to use switch expressions, fixing a Pine v5 line-continuation issue.
A compact, on-chart reference panel for stocks. Shows 20-day average volume, ATR (14), and ATR as a percentage of price in a fully configurable table, and drops an "📊 Earnings" label on bars where an earnings release occurred. Designed for the daily timeframe.
How it works
The indicator computes three metrics on every bar and renders them in a table on the most recent bar:
20 Day Avg Vol — A 20-period simple moving average of volume, formatted with K / M / B suffixes for readability.
ATR (14) — Pine's built-in 14-period Average True Range, the standard short-term volatility measure.
ATR % — ATR(14) expressed as a percentage of the current close. This normalizes volatility across stocks at different price levels, so you can compare a $20 stock and a $400 stock on equal footing.
Separately, the indicator calls request.earnings() to detect bars where an earnings event was reported. When one is found on the most recent bar, an orange "📊 Earnings" label is placed above the bar's high.
The table is created once and updated only on the last bar (barstate.islast), so there is no historical clutter and no per-bar drawing overhead.
Inputs
Table Position — Vertical (top / middle / bottom) and Horizontal (left / center / right). All 9 placements are supported.
Table Appearance — Background color, font color, and font size (tiny / small / normal / large / huge).
Recommended usage
Apply on a daily chart. Best paired with a price-action or trend setup where you want quick context on liquidity (volume), volatility (ATR / ATR %), and event risk (earnings).
Release notes — v1.1
Added configurable table position — vertical (top / middle / bottom) and horizontal (left / center / right), giving 9 placement options.
Added configurable background color, font color, and font size.
Removed the Market Cap row from the table.
Renamed the indicator to "Stock Reference Data - Daily" to reflect its intended timeframe.
Refactored position and size mapping to use switch expressions, fixing a Pine v5 line-continuation issue.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.