OPEN-SOURCE SCRIPT
BTC Halving Indicator

**What it does:**
- Draws an **orange vertical line + label** at each past halving: 28 Nov 2012, 9 Jul 2016, 11 May 2020, and 20 Apr 2024
- Draws a **dashed aqua line** at the estimated 5th halving (~April 2028) when it's close enough to appear on your chart
- Shows a **live counter table** in the top-right: days since the last halving and estimated days until the next one
- Has settings to change colors and toggle the labels/counter on or off
**How to install it in TradingView:**
1. Open a BTC chart (e.g. BTCUSD) on tradingview.com
2. Click **Pine Editor** at the bottom of the screen
3. Delete whatever's in the editor, paste in the full contents of the file
4. Click **Save**, then **Add to chart**
Two tips: use the **daily or weekly timeframe** — on low timeframes like 5m, TradingView doesn't load history back to 2012, so the older halving lines won't appear. And note the 2028 date is an estimate; the actual halving happens at block 1,050,000, so the real date drifts slightly with block times.
Want me to add anything, like cycle-phase background shading or price-at-halving markers?
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。