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が提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。