OPEN-SOURCE SCRIPT

Close Earnings Warning by topefu

392
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)

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。