OPEN-SOURCE SCRIPT
Aggiornato Stock Reference Data - Weekly

# Stock Reference Data - Weekly
Requirements and reference document for the `Stock Reference Data - Weekly.pine` TradingView indicator.
## Description
A compact, on-chart reference panel for stocks intended for the weekly timeframe. Shows Market Cap and the company's Sector in a fully configurable table, and drops an "📊 Earnings" label on bars where an earnings release occurred.
## How it works
The indicator pulls two pieces of fundamental / reference data and renders them in a table on the most recent bar:
- **Market Cap** — Computed as `TOTAL_SHARES_OUTSTANDING (FQ) × close`. Total shares outstanding is fetched via `request.financial()` for the most recent fiscal quarter, then multiplied by the current close. The result is formatted with K / M / B / T suffixes for readability (e.g. `2.85T`, `412.5B`).
- **Sector** — Pulled directly from `syminfo.sector`, which is the sector classification TradingView associates with the symbol (e.g. *Technology Services*, *Finance*, *Energy Minerals*). Falls back to `N/A` for symbols where the sector is not populated (e.g. ETFs, indices, crypto).
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 Position — `top` / `middle` / `bottom` (default: `top`)
- Horizontal Position — `left` / `center` / `right` (default: `right`)
All 9 corner/edge placements are supported.
**Table Appearance**
- Background Color (default: black at 80% transparency)
- Font Color (default: black)
- Font Size — `tiny` / `small` / `normal` / `large` / `huge` (default: `small`)
## Recommended usage
Apply on a weekly chart. Best used as a "reference card" alongside a long-term trend or position-sizing setup, where market-cap tier (large vs. mid vs. small cap) and sector classification matter for context — for example, when comparing setups across watchlists or rotating between sectors.
## Release notes
### v1.0
- Initial release. Top-right table showing Market Cap and Sector.
- Configurable table position (9 placements), background color, font color, and font size.
- Earnings label on the most recent bar when an earnings event is detected.
Requirements and reference document for the `Stock Reference Data - Weekly.pine` TradingView indicator.
## Description
A compact, on-chart reference panel for stocks intended for the weekly timeframe. Shows Market Cap and the company's Sector in a fully configurable table, and drops an "📊 Earnings" label on bars where an earnings release occurred.
## How it works
The indicator pulls two pieces of fundamental / reference data and renders them in a table on the most recent bar:
- **Market Cap** — Computed as `TOTAL_SHARES_OUTSTANDING (FQ) × close`. Total shares outstanding is fetched via `request.financial()` for the most recent fiscal quarter, then multiplied by the current close. The result is formatted with K / M / B / T suffixes for readability (e.g. `2.85T`, `412.5B`).
- **Sector** — Pulled directly from `syminfo.sector`, which is the sector classification TradingView associates with the symbol (e.g. *Technology Services*, *Finance*, *Energy Minerals*). Falls back to `N/A` for symbols where the sector is not populated (e.g. ETFs, indices, crypto).
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 Position — `top` / `middle` / `bottom` (default: `top`)
- Horizontal Position — `left` / `center` / `right` (default: `right`)
All 9 corner/edge placements are supported.
**Table Appearance**
- Background Color (default: black at 80% transparency)
- Font Color (default: black)
- Font Size — `tiny` / `small` / `normal` / `large` / `huge` (default: `small`)
## Recommended usage
Apply on a weekly chart. Best used as a "reference card" alongside a long-term trend or position-sizing setup, where market-cap tier (large vs. mid vs. small cap) and sector classification matter for context — for example, when comparing setups across watchlists or rotating between sectors.
## Release notes
### v1.0
- Initial release. Top-right table showing Market Cap and Sector.
- Configurable table position (9 placements), background color, font color, and font size.
- Earnings label on the most recent bar when an earnings event is detected.
Note di rilascio
Added FINRA short volume %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.