OPEN-SOURCE SCRIPT
SPY ATR Bands

An all-in-one overlay that combines ATR-based deviation bands, all-time-high levels, and a weekly-EMA trend filter into a single clean tool. Built for swing dip-buying on SPY, but works on any symbol.
Features
• Multi-timeframe ATR bands (D / 4H / 1H) — Keltner-family bands built from an RMA centerline ± ATR × multiplier, with three depths each (narrow ×0.6 / main / wide ×1.5). Because they scale with ATR, a touch of the wide band means a statistically significant move relative to current volatility, not a fixed %. Lines are smoothed between higher-TF updates. Color-coded by TF (D / 4H / 1H), with optional narrow/wide layers.
• Intersection markers — A bubble is dropped at the deepest band touched within each incursion (narrow > main > wide), per timeframe. Instantly shows where price is interacting with each TF's volatility envelope.
• ATH line + pullback levels — Running all-time-high line plus −3 / −4 / −5 / −10 / −15 / −20 / −25% pullback levels (labels only). The ATH label shows price, days since the last ATH, and current trend-leg %. A live "Now" label shows price and exact % distance from the ATH (candle-colored).
• W EMA20 proxy (trend filter) — Approximates the weekly EMA20 on any timeframe (1H/Daily proxies, down to intraday) so you always see the higher-TF trend line. The line turns green when the last daily candle closes above it and red when it closes below — a clean bull/bear read. Includes a tolerance zone, an intersection marker, and an optional interpolation mode for a smooth line down to 5-minute charts.
• Built-in alerts — "Any intersection marker", "Lower-band touch (dip)", and "W EMA20 touch".
How to use
Watch for price tapping a lower band (oversold) while well below the ATH and above the W EMA20 line (trend intact). The deeper the band and the further from the ATH, the higher-conviction the pullback. The W EMA20 color tells you whether the broader regime is bullish or bearish.
Most colors, widths, tolerances and toggles are fully configurable in settings.
Not financial advice — for educational / technical-analysis use.
Features
• Multi-timeframe ATR bands (D / 4H / 1H) — Keltner-family bands built from an RMA centerline ± ATR × multiplier, with three depths each (narrow ×0.6 / main / wide ×1.5). Because they scale with ATR, a touch of the wide band means a statistically significant move relative to current volatility, not a fixed %. Lines are smoothed between higher-TF updates. Color-coded by TF (D / 4H / 1H), with optional narrow/wide layers.
• Intersection markers — A bubble is dropped at the deepest band touched within each incursion (narrow > main > wide), per timeframe. Instantly shows where price is interacting with each TF's volatility envelope.
• ATH line + pullback levels — Running all-time-high line plus −3 / −4 / −5 / −10 / −15 / −20 / −25% pullback levels (labels only). The ATH label shows price, days since the last ATH, and current trend-leg %. A live "Now" label shows price and exact % distance from the ATH (candle-colored).
• W EMA20 proxy (trend filter) — Approximates the weekly EMA20 on any timeframe (1H/Daily proxies, down to intraday) so you always see the higher-TF trend line. The line turns green when the last daily candle closes above it and red when it closes below — a clean bull/bear read. Includes a tolerance zone, an intersection marker, and an optional interpolation mode for a smooth line down to 5-minute charts.
• Built-in alerts — "Any intersection marker", "Lower-band touch (dip)", and "W EMA20 touch".
How to use
Watch for price tapping a lower band (oversold) while well below the ATH and above the W EMA20 line (trend intact). The deeper the band and the further from the ATH, the higher-conviction the pullback. The W EMA20 color tells you whether the broader regime is bullish or bearish.
Most colors, widths, tolerances and toggles are fully configurable in settings.
Not financial advice — for educational / technical-analysis use.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.