PINE LIBRARY
Vantage_News_Types

Vantage_News_Types — Shared vocabulary of US economic event types and a default severity taxonomy for Pine Script news-filtering strategies.
─────────────────────────────────────────
WHAT IT DOES
Publishes a shared set of named event-type constants and a default severity mapping so that news-calendar data libraries, severity-override tables, and consuming strategies can all agree on what each event type means without maintaining their own copy of the list.
─────────────────────────────────────────
WHAT IT PROVIDES
Named constants for 125+ tracked US economic events — CPI, PPI, PCE, FOMC statements and speakers, non-farm payrolls, ISM, retail sales, GDP, housing, consumer confidence, crude inventories, Treasury auctions, bank holidays, and more. Each is a compact integer ID you can store in a packed news table.
A default severity taxonomy expressed relative to equity-index futures — Severity 1 — Watch (low-impact, not expected to move the market), Severity 2 — Delay entry (pause entries until a configurable window after release), and Severity 3 — Block the session (do not trade on a day carrying this event). Callers for other instruments can still use the type IDs and apply their own mapping.
Time helpers for the HHMM → milliseconds conversion used by packed news tables, and append helpers for building up parallel date / time / type-id arrays.
─────────────────────────────────────────
HOW TO USE
A minimal usage example is in the comment block at the top of the source file. Updated weekly as new event types are observed or severity defaults change.
─────────────────────────────────────────
WHAT IT DOES
Publishes a shared set of named event-type constants and a default severity mapping so that news-calendar data libraries, severity-override tables, and consuming strategies can all agree on what each event type means without maintaining their own copy of the list.
─────────────────────────────────────────
WHAT IT PROVIDES
Named constants for 125+ tracked US economic events — CPI, PPI, PCE, FOMC statements and speakers, non-farm payrolls, ISM, retail sales, GDP, housing, consumer confidence, crude inventories, Treasury auctions, bank holidays, and more. Each is a compact integer ID you can store in a packed news table.
A default severity taxonomy expressed relative to equity-index futures — Severity 1 — Watch (low-impact, not expected to move the market), Severity 2 — Delay entry (pause entries until a configurable window after release), and Severity 3 — Block the session (do not trade on a day carrying this event). Callers for other instruments can still use the type IDs and apply their own mapping.
Time helpers for the HHMM → milliseconds conversion used by packed news tables, and append helpers for building up parallel date / time / type-id arrays.
─────────────────────────────────────────
HOW TO USE
A minimal usage example is in the comment block at the top of the source file. Updated weekly as new event types are observed or severity defaults change.
Thư viện Pine
Theo đúng tinh thần TradingView, tác giả đã công bố mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác trong cộng đồng có thể tái sử dụng. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này cho mục đích cá nhân hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc tái sử dụng mã này trong các ấn phẩm phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Thư viện Pine
Theo đúng tinh thần TradingView, tác giả đã công bố mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác trong cộng đồng có thể tái sử dụng. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này cho mục đích cá nhân hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc tái sử dụng mã này trong các ấn phẩm phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.