OPEN-SOURCE SCRIPT
업데이트됨 CVR Earnings Window Filter

What It Does
The indicator answers a single practical question on every chart: how close is the next earnings event, and does that proximity matter for my trading decision?
It calculates the number of calendar days between right now and the next scheduled earnings release using TradingView's built-in earnings.future_time variable, which holds the Unix timestamp of the next announced earnings date for the current symbol.
Inputs
ParameterDefaultRangeDescriptionN — days until earnings51–60Width of the earnings window in calendar daysFilter modeAvoid window—Controls which condition is a pass
Core Calculation
days_until = floor( (earnings.future_time − timenow) / 86,400,000 )
Floored to full calendar days. Earnings day itself is always day 0 and is always excluded from the window. The active window is the interval [1, N].
days_untilMeaningnaNo earnings date on file for this symbol0Earnings today — excluded from window1Earnings tomorrow — first day inside window> NOutside window — far enough from earnings
Filter Modes
Avoid Window — passes = true when the symbol is outside the window. Enforces a pre-earnings blackout zone (e.g. no new entries within 5 days of a report). Symbols with no date on file (na) pass as safe.
Target Window — passes = true when the symbol is inside the window. Surfaces stocks approaching an earnings catalyst for pre-earnings setup hunting.
Visual Output
Blue step-line — raw days_until value per bar
Dashed line at N — outer boundary; when the line crosses below, the window is active
Dotted lines at 1 and 0 — inner boundaries marking the earnings day itself
Orange background — active whenever the window is open (1 ≤ days_until ≤ N)
Label on last bar — green if the symbol passes the active mode, red if blocked
Edge Cases
No date (na): Avoid mode passes, Target mode blocks
Earnings today (0): outside the window in both modes — the earnings day is never included
Calendar vs. trading days: the calculation uses raw calendar days; a Monday report shows 2 on Friday, not 1
Data accuracy: depends on whether TradingView has a confirmed date; unconfirmed estimates may differ from the actual report
The indicator answers a single practical question on every chart: how close is the next earnings event, and does that proximity matter for my trading decision?
It calculates the number of calendar days between right now and the next scheduled earnings release using TradingView's built-in earnings.future_time variable, which holds the Unix timestamp of the next announced earnings date for the current symbol.
Inputs
ParameterDefaultRangeDescriptionN — days until earnings51–60Width of the earnings window in calendar daysFilter modeAvoid window—Controls which condition is a pass
Core Calculation
days_until = floor( (earnings.future_time − timenow) / 86,400,000 )
Floored to full calendar days. Earnings day itself is always day 0 and is always excluded from the window. The active window is the interval [1, N].
days_untilMeaningnaNo earnings date on file for this symbol0Earnings today — excluded from window1Earnings tomorrow — first day inside window> NOutside window — far enough from earnings
Filter Modes
Avoid Window — passes = true when the symbol is outside the window. Enforces a pre-earnings blackout zone (e.g. no new entries within 5 days of a report). Symbols with no date on file (na) pass as safe.
Target Window — passes = true when the symbol is inside the window. Surfaces stocks approaching an earnings catalyst for pre-earnings setup hunting.
Visual Output
Blue step-line — raw days_until value per bar
Dashed line at N — outer boundary; when the line crosses below, the window is active
Dotted lines at 1 and 0 — inner boundaries marking the earnings day itself
Orange background — active whenever the window is open (1 ≤ days_until ≤ N)
Label on last bar — green if the symbol passes the active mode, red if blocked
Edge Cases
No date (na): Avoid mode passes, Target mode blocks
Earnings today (0): outside the window in both modes — the earnings day is never included
Calendar vs. trading days: the calculation uses raw calendar days; a Monday report shows 2 on Friday, not 1
Data accuracy: depends on whether TradingView has a confirmed date; unconfirmed estimates may differ from the actual report
릴리즈 노트
none오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.