OPEN-SOURCE SCRIPT
Close Earnings Warning by topefu

Close Earnings Warning
Displays a prominent warning label on the chart when the next earnings date is within your customizable threshold (default: 21 days).
Overview
This overlay indicator uses TradingView's built-in earnings.future_time to calculate days until the upcoming earnings release. A red label with "⚠ close earnings!" appears to the right of the last bar if the event is approaching, helping traders avoid positions near volatile announcements. Efficiently updates only on the last bar for performance.
Features
Adjustable days threshold (1-90 days) via input.
Automatic calculation using milliseconds timestamps.
Persistent, non-repainting label at high price level with white text on red background.
Handles cases with no upcoming earnings (no label shown)
Displays a prominent warning label on the chart when the next earnings date is within your customizable threshold (default: 21 days).
Overview
This overlay indicator uses TradingView's built-in earnings.future_time to calculate days until the upcoming earnings release. A red label with "⚠ close earnings!" appears to the right of the last bar if the event is approaching, helping traders avoid positions near volatile announcements. Efficiently updates only on the last bar for performance.
Features
Adjustable days threshold (1-90 days) via input.
Automatic calculation using milliseconds timestamps.
Persistent, non-repainting label at high price level with white text on red background.
Handles cases with no upcoming earnings (no label shown)
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.