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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.