OPEN-SOURCE SCRIPT
Vertical Event Lines - BTC Halving & Custom Dates

This indicator plots vertical lines and labels for Bitcoin halving dates and any custom events you define directly on the price chart.
It is designed as a clean, lightweight event-timeline overlay so you can instantly see where key dates occur relative to price action.
Main features
How to use
This script is intended as a visual reference tool only.
It does not generate trading signals, alerts or backtests.
It is designed as a clean, lightweight event-timeline overlay so you can instantly see where key dates occur relative to price action.
Main features
- Built-in Bitcoin halving dates (2012, 2016, 2020, 2024), plus 8 additional custom event slots with freely configurable date/time, name and color.
- Vertical lines are positioned using [code]xloc.bar_time[/code], ensuring each event is anchored to the exact timestamp in the chart’s timeframe and timezone.
- Past and current events:
A label is created once, on the first bar that crosses the event time, and placed near the bar’s high for consistent readability across symbols and timeframes. - Future events:
A separate label is shown at the bottom of the chart, making future dates clearly visible even to the right of the last bar. These labels update only on the most recent bar to keep the script efficient. - Flexible styling:
Global controls for line width, line style and label size, with per-event color selection and optional per-event overrides of global width and style.
How to use
- Add the script to any chart (BTC or other symbols). It works on all timeframes.
- Use the Global settings to configure default line style, line width and label appearance (size, orientation, text color).
- In each Event X section, enable the event and set:
- Date/time in [code]YYYY-MM-DD HH:MM[/code] format
- Event name
- Color
- Optional custom width/style
- When scrolling through time:
- Events left of the last bar show a vertical line and a one-time label at the crossing bar.
- Events right of the last bar show a vertical line and a bottom label that remains visible in the future.
This script is intended as a visual reference tool only.
It does not generate trading signals, alerts or backtests.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.