PINE LIBRARY
Atualizado Vantage_News

Vantage News is a Pine Script library that provides pre-market economic event filtering defaults intended for strategies that trade on YM futures. It determines a default for whether trading should be blocked, delayed, or allowed on any given day.
Core Concept
News events are pre-compiled into Pine Script data libraries organized by half-year (LO1_News2025H1, LO1_News2025H2, etc.), updated weekly on Sundays. There are no API calls — events are baked into arrays of dates, times, type IDs, and severities.
Severity System
Can be configured to define or override three default severity tiers:
- Sev 3 (CPI, NFP, FOMC) — defaults to blocks the entire day or delays, depending on policy
- Sev 2 (ISM PMI, claims) — defaults to delay trading until the event time + a configurable post-delay window
- Sev 1 (secondary indicators) — defaults to no delays
Blocking vs Delaying
- Block: No trading for the full session. WillTradeToday() returns false.
- Delay: Trading allowed after eventTime + delayMinutes. IsDelayed(currentTimeMs) returns true until the release time passes.
Provides a per-event-type policy mechanism so overrides can force any event to block, delay, or be ignored regardless of its base severity.
Next Trading Window Calculation
FindNextTradingWindow() scans forward up to 14 days, skipping weekends and blocked days based on the provided configuration. If the next tradeable day has a delay, it returns the delayed start time — so an info panel can show e.g. "Mon 7:35 AM" to indicate the next trading opening
Exception Mappings
Each half-year library can ship per-event-type overrides (different severity, custom delay minutes, tags). When the applyLibExceptionMappings configuration is enabled, these override the base severity — allowing the data to carry date-specific adjustments.
Special Handling
CME early close days are encoded as a special event type. CheckCmeEarlyClose() returns a halt timestamp so a strategy can truncate the session.
Caching
Evaluation is lazy and memoized by date string — EvaluateForDate() only recomputes when the date changes. The event cache is built once at initialization via a day index for fast date lookups.
Core Concept
News events are pre-compiled into Pine Script data libraries organized by half-year (LO1_News2025H1, LO1_News2025H2, etc.), updated weekly on Sundays. There are no API calls — events are baked into arrays of dates, times, type IDs, and severities.
Severity System
Can be configured to define or override three default severity tiers:
- Sev 3 (CPI, NFP, FOMC) — defaults to blocks the entire day or delays, depending on policy
- Sev 2 (ISM PMI, claims) — defaults to delay trading until the event time + a configurable post-delay window
- Sev 1 (secondary indicators) — defaults to no delays
Blocking vs Delaying
- Block: No trading for the full session. WillTradeToday() returns false.
- Delay: Trading allowed after eventTime + delayMinutes. IsDelayed(currentTimeMs) returns true until the release time passes.
Provides a per-event-type policy mechanism so overrides can force any event to block, delay, or be ignored regardless of its base severity.
Next Trading Window Calculation
FindNextTradingWindow() scans forward up to 14 days, skipping weekends and blocked days based on the provided configuration. If the next tradeable day has a delay, it returns the delayed start time — so an info panel can show e.g. "Mon 7:35 AM" to indicate the next trading opening
Exception Mappings
Each half-year library can ship per-event-type overrides (different severity, custom delay minutes, tags). When the applyLibExceptionMappings configuration is enabled, these override the base severity — allowing the data to carry date-specific adjustments.
Special Handling
CME early close days are encoded as a special event type. CheckCmeEarlyClose() returns a halt timestamp so a strategy can truncate the session.
Caching
Evaluation is lazy and memoized by date string — EvaluateForDate() only recomputes when the date changes. The event cache is built once at initialization via a day index for fast date lookups.
Notas de Lançamento
v2 Updated 2026 H1 News Event with the latest information for ForexfactoryNotas de Lançamento
v3 Updated NewsNotas de Lançamento
v4 Updated News TypesNotas de Lançamento
v5 Updated NewsNotas de Lançamento
v6 Updated NewsNotas de Lançamento
v7 Updated NewsNotas de Lançamento
v8 Updated NewsNotas de Lançamento
v9 Updated NewsNotas de Lançamento
v10 Updated News Notas de Lançamento
v11 - Updated News EngineNotas de Lançamento
v12 - Updated News Window Display Settings Notas de Lançamento
v13 Updated NewsNotas de Lançamento
v14 Updated NewsNotas de Lançamento
v15 Updated NewsNotas de Lançamento
v16 Updated NewsNotas de Lançamento
v17 Updated for contract roll overNotas de Lançamento
v18 New company packing systemNotas de Lançamento
v19 Updated for AprilNotas de Lançamento
v20 Updated NewsNotas de Lançamento
Vantage_News — Packed US economic news calendar data for Pine Script strategies. Current events (2025–2026), refreshed weekly.─────────────────────────────────────────
WHAT IT DOES
Packages a maintained US economic news calendar as a Pine Script data library, so any strategy can detect and avoid trading during the higher-volatility moments around major economic releases. Data is stored in packed array literals with pre-computed integer times and type IDs — no runtime string parsing — to keep load time in Pine fast as the calendar grows.
─────────────────────────────────────────
WHAT IT PROVIDES
A packed calendar of US economic releases and speaker events covering 2025 through the current week. Types align with the Vantage_News_Types vocabulary; reference severities come from that library's default taxonomy (watch / delay / block).
Optional per-event exception overrides (severity and delay) so individual dates can carry a stronger or weaker classification than the type default when market context warrants.
─────────────────────────────────────────
HOW TO USE
A minimal usage example is in the comment block at the top of the source file — import, call LoadNewsRows(), iterate the five parallel arrays. Pair with Vantage_News_Types for type-ID severity lookups.
Notas de Lançamento
v22 Updated NewsNotas de Lançamento
v23 Updated NewsNotas de Lançamento
v24 Updated the NewsNotas de Lançamento
v25 Updated NewsNotas de Lançamento
v26 Updated NewsBiblioteca do Pine
Em verdadeiro espírito TradingView, o autor publicou este código Pine como uma biblioteca de código aberto para que outros programadores Pine da nossa comunidade possam reutilizá-lo. Parabéns ao autor! Você pode usar esta biblioteca de forma privada ou em outras publicações de código aberto, mas a reutilização deste código em publicações é regida pelas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Biblioteca do Pine
Em verdadeiro espírito TradingView, o autor publicou este código Pine como uma biblioteca de código aberto para que outros programadores Pine da nossa comunidade possam reutilizá-lo. Parabéns ao autor! Você pode usar esta biblioteca de forma privada ou em outras publicações de código aberto, mas a reutilização deste código em publicações é regida pelas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.