OPEN-SOURCE SCRIPT
已更新

POLY 15M - 15m Zone Overlay

810
15m Zone Overlay — Real-Time 15-Minute Session Highlight with ATR Markers

This indicator highlights the current 15-minute block on a 1-minute chart in real time, dividing each session into three color-coded phases:

🔴 Minutes 1–2 (Entry zone) — Red background 🟢 Minutes 3–12 (Active zone) — Green background 🔴 Minutes 13–15 (Exit zone) — Red background

The overlay is applied only to the current 15-minute window (starting at :00, :15, :30, or :45 of each hour). As new candles appear, the background fills in progressively. When the next 15-min block begins, the previous overlay disappears and a new one starts.

ATR-based markers are displayed below candles within the active block, helping you assess volatility at a glance:

🟠 Orange dot (ATR < 50) — shown under minutes 6–12, indicating low volatility
🔵 Blue square (ATR 51–150) — shown under minutes 4–12, indicating moderate volatility
🟢 Green triangle (ATR > 150) — shown under minutes 2–8, indicating high volatility
Each ATR marker can be toggled on/off individually in the settings.

Additional features:

Dotted vertical line at the start of each 15-min block
Time label (e.g. "14:30") at the block boundary
Customizable zone colors and opacity
Configurable ATR period length
Best used on: 1-minute timeframe Ideal for: Scalpers and short-term traders who structure their entries and exits around fixed 15-minute intervals.
發行說明
What has changed:

Block ID via pure UTC math: math.floor(time / 900000) vs math.floor(timenow / 900000) — no minute()/second(), no timezone issues
Double protection: a bar is colored only if it is in the same 15-minute block as timenow and is within the last 15 bars from the right edge of the chart
The second condition (bar_index >= last_bar_index - 15) ensures that when the block changes, the old bars will not remain colored — they fall out of the redraw window

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。