OPEN-SOURCE SCRIPT
MTF Candle Countdown: Multi-Timeframe Close Timer

⏳ Know exactly how long until your candles close — on up to 4 timeframes at once, in one clean panel.
Stop switching charts to check the 1H or 4H while you trade the 5m. See every countdown you care about in one place.
──────────────────────────
✅ WHAT IT DOES
Shows a live countdown to candle close for up to 4 timeframes you choose, side by side. Each row shows the timeframe, the time left, and the exact clock time that candle will close.
──────────────────────────
⚙️ WHAT YOU CAN CONTROL
• Up to 4 timeframes — pick any, turn each on/off
• Corner — any of the 4 chart corners
• Font size — Small, Medium, or Large
• Text + background colors
• Close-time column — show/hide, and choose its timezone
• Near-close highlight — a row turns amber in the final seconds before close
──────────────────────────
🔔 ALERTS (two independent switches, both optional)
• "Closing soon" — fires shortly before a candle closes (your heads-up)
• "Candle closed" — fires the moment a candle closes (your confirmation)
Turn on either, both, or neither.
──────────────────────────
🌍 TIMEZONE — SET IT ONCE
TradingView scripts can't read your chart's timezone, so pick yours in the "Close-time timezone" setting (New York, London, Tokyo, UTC, etc.). Set it to match your chart and the close times line up perfectly. Daylight saving is handled automatically.
──────────────────────────
ℹ️ GOOD TO KNOW
• A countdown timeframe must be the same as or higher than your chart timeframe. (A 1-minute countdown needs a ≤1-minute chart.) Rows below your chart timeframe show a gentle "use ≤Xm chart" reminder.
• Works on any symbol — crypto, forex, futures, stocks.
• On closed markets the countdown pauses until trading resumes (this is normal for all indicators).
• Not designed for Bar Replay — use it on a live chart.
──────────────────────────
🚀 HOW TO USE
1. Add to your chart
2. Open settings (gear icon)
3. Choose your timeframes, timezone, colors, and corner
──────────────────────────
👨💻 FOR DEVELOPERS / AUTOMATION
Set "Alert message format" to JSON event and the alerts emit a structured, webhook-ready payload (sent as application/json):
{"ticker":"BTCUSD","exchange":"COINBASE","timeframe":"4H","event":"closed","price":60800.5,"time":1749264000000}
("closing_soon" events also include "seconds_left".)
This is a TIMING EVENT source, not an order engine — it tells you WHEN a candle closes, with no buy/sell baked in (a countdown has no direction). Route the event to your webhook receiver or bridge (CrossTrade, NinjaView, your own listener, n8n, etc.) and map it to your platform's order format there. Each event fires once per candle (no spam). Prefer "Plain text" format for human phone/email alerts.
──────────────────────────
Free and open-source. Feedback welcome 🙏
Stop switching charts to check the 1H or 4H while you trade the 5m. See every countdown you care about in one place.
──────────────────────────
✅ WHAT IT DOES
Shows a live countdown to candle close for up to 4 timeframes you choose, side by side. Each row shows the timeframe, the time left, and the exact clock time that candle will close.
──────────────────────────
⚙️ WHAT YOU CAN CONTROL
• Up to 4 timeframes — pick any, turn each on/off
• Corner — any of the 4 chart corners
• Font size — Small, Medium, or Large
• Text + background colors
• Close-time column — show/hide, and choose its timezone
• Near-close highlight — a row turns amber in the final seconds before close
──────────────────────────
🔔 ALERTS (two independent switches, both optional)
• "Closing soon" — fires shortly before a candle closes (your heads-up)
• "Candle closed" — fires the moment a candle closes (your confirmation)
Turn on either, both, or neither.
──────────────────────────
🌍 TIMEZONE — SET IT ONCE
TradingView scripts can't read your chart's timezone, so pick yours in the "Close-time timezone" setting (New York, London, Tokyo, UTC, etc.). Set it to match your chart and the close times line up perfectly. Daylight saving is handled automatically.
──────────────────────────
ℹ️ GOOD TO KNOW
• A countdown timeframe must be the same as or higher than your chart timeframe. (A 1-minute countdown needs a ≤1-minute chart.) Rows below your chart timeframe show a gentle "use ≤Xm chart" reminder.
• Works on any symbol — crypto, forex, futures, stocks.
• On closed markets the countdown pauses until trading resumes (this is normal for all indicators).
• Not designed for Bar Replay — use it on a live chart.
──────────────────────────
🚀 HOW TO USE
1. Add to your chart
2. Open settings (gear icon)
3. Choose your timeframes, timezone, colors, and corner
──────────────────────────
👨💻 FOR DEVELOPERS / AUTOMATION
Set "Alert message format" to JSON event and the alerts emit a structured, webhook-ready payload (sent as application/json):
{"ticker":"BTCUSD","exchange":"COINBASE","timeframe":"4H","event":"closed","price":60800.5,"time":1749264000000}
("closing_soon" events also include "seconds_left".)
This is a TIMING EVENT source, not an order engine — it tells you WHEN a candle closes, with no buy/sell baked in (a countdown has no direction). Route the event to your webhook receiver or bridge (CrossTrade, NinjaView, your own listener, n8n, etc.) and map it to your platform's order format there. Each event fires once per candle (no spam). Prefer "Plain text" format for human phone/email alerts.
──────────────────────────
Free and open-source. Feedback welcome 🙏
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.