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 aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas 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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas 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.