OPEN-SOURCE SCRIPT
Candle Spread + ATR SMA Analysis

This indicator combines elements from two popular open-source scripts — Candle Range Compare
by oldinvestor https://www.tradingview.com/script/6WSs256o-Candle-Range-Compare/
and Objective Analysis of Spread (VSA)
by Rin-Ninhttps://www.tradingview.com/script/2SYW2RFs-Objective-Analysis-of-Spread-VSA/
— into a single tool for analyzing candle spreads (ranges and bodies) in relation to volatility benchmarks.
🔎 What It Does
Candle Decomposition:
Plots total candle ranges (high–low) in gray, for both up and down closes.
Plots up-close bodies (open–close) in white.
Plots down-close bodies in black.
This makes it easy to spot whether volatility comes from real price movement (body) or extended wicks.
ATR & SMA Volatility Bands:
Calculates ATR (Average True Range) and overlays it as a black line.
Plots four volatility envelopes derived from the SMA of the true range:
0.8× (blue, shaded)
1.3× (green)
1.8× (red)
3.0× (purple)
Colored fill zones highlight when candle spreads are below, within, or above key thresholds.
Visual Context:
Track expansion/contraction in spreads.
Compare bullish (white) vs bearish (black) bodies to gauge buying/selling pressure.
Identify when candles stretch beyond typical volatility ranges.
📈 How To Use It
VSA context: Wide down bars (black) beyond ATR bands may suggest supply; wide up bars (white) may indicate demand.
Trend confirmation: Expanding ranges above average thresholds (green/red/purple bands) often confirm momentum.
Reversal potential: Small bodies but large ranges (gray + wicks) frequently appear at turning points.
Volatility filter: Use ATR bands to filter trades — e.g., only act when candle ranges exceed 1.3× or 1.8× SMA thresholds.
🙏 Credits
This script is inspired by and combines ideas from:
Candle Range Compare
by oldinvestor
Objective Analysis of Spread (VSA)
by Rin-Nin
Big thanks to both authors for their valuable contributions to the TradingView community.
One thing I couldnt quite get to work is being able to display up and down wicks like in the candle range compare, so I just add that indicator to the chart as well, uncheck everything but the wick plots and there it is.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
Follow me on Instagram and Youtube
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
Follow me on Instagram and Youtube
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.