OPEN-SOURCE SCRIPT
Mis à jour 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.
Notes de version
Added FINRA short volume %Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.