OPEN-SOURCE SCRIPT
Daily Open Close Support & Resistance

Plots support and resistance built from the OPENS and CLOSES of recent daily bars — not from pivots. The idea: price areas where the market repeatedly opened or closed tend to act as support and resistance.
HOW IT WORKS
Every daily open and close in the lookback window (default 84 bars ≈ 4 months) is collected and then clustered. Opens/closes that fall within an ATR-scaled band merge into a single level, and the number that merge in becomes that level's strength. Stronger levels draw as heavier, more opaque lines and carry a ×count tag. Because the merge band scales with ATR, it auto-widens on volatile symbols and tightens on calm ones — no fixed dollar tolerance to tune.
AUTO-TIMEFRAME
Apply it on the daily chart and it reads native daily bars. Apply it on any intraday chart (3-min, 5-min, etc.) and it automatically pulls the daily opens/closes, so the same daily levels appear on your execution chart with no timeframe setting to change. The info table shows whether the current source is "native" or "pulled" so you can confirm at a glance.
ALERTS
Five conditions: price touching nearest support, nearest resistance, or any level (within an ATR-scaled tolerance), plus a close breaking through support or resistance. Touch alerts fire once on the transition, not on every following bar.
SETTINGS
Lookback (84 ≈ 4 months, 63 ≈ 3 months), merge distance in ATR, minimum cluster count to display, max levels per side, a near-price window to hide distant levels, touch tolerance, and full styling control. Optional toggles to also include daily highs and lows.
NOTE ON INTRADAY HISTORY
On a sub-daily chart the lookback only reaches as far back as the intraday history your TradingView plan loads, so the level set there may be shorter than on the daily chart. The daily chart always shows the full lookback. This is a chart-data limitation, not a script setting.
Repainting is avoided via lookahead_off and by referencing only completed higher-timeframe bars.
HOW IT WORKS
Every daily open and close in the lookback window (default 84 bars ≈ 4 months) is collected and then clustered. Opens/closes that fall within an ATR-scaled band merge into a single level, and the number that merge in becomes that level's strength. Stronger levels draw as heavier, more opaque lines and carry a ×count tag. Because the merge band scales with ATR, it auto-widens on volatile symbols and tightens on calm ones — no fixed dollar tolerance to tune.
AUTO-TIMEFRAME
Apply it on the daily chart and it reads native daily bars. Apply it on any intraday chart (3-min, 5-min, etc.) and it automatically pulls the daily opens/closes, so the same daily levels appear on your execution chart with no timeframe setting to change. The info table shows whether the current source is "native" or "pulled" so you can confirm at a glance.
ALERTS
Five conditions: price touching nearest support, nearest resistance, or any level (within an ATR-scaled tolerance), plus a close breaking through support or resistance. Touch alerts fire once on the transition, not on every following bar.
SETTINGS
Lookback (84 ≈ 4 months, 63 ≈ 3 months), merge distance in ATR, minimum cluster count to display, max levels per side, a near-price window to hide distant levels, touch tolerance, and full styling control. Optional toggles to also include daily highs and lows.
NOTE ON INTRADAY HISTORY
On a sub-daily chart the lookback only reaches as far back as the intraday history your TradingView plan loads, so the level set there may be shorter than on the daily chart. The daily chart always shows the full lookback. This is a chart-data limitation, not a script setting.
Repainting is avoided via lookahead_off and by referencing only completed higher-timeframe bars.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.