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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。