OPEN-SOURCE SCRIPT
Volume Trend Color

This indicator colors volume bars according to trend context
instead of individual candle direction.
How it works
- A moving average of volume defines the reference level
(yellow line).
- A second moving average on price defines trend direction.
- Bars are green when price trades above the trend MA, red
when below, and gray when volume falls under the
low-volume threshold.
Why color by trend rather than by candle
Coloring volume by candle direction repeats information
already visible on the price chart: a red candle produces a
red bar, and nothing is added. Coloring by trend context
instead answers a different question, namely whether
participation is arriving in the direction the reader is
already tracking. A pullback inside an uptrend will show
red candles but green volume bars, which makes it easy to
separate a pause in an ongoing move from a genuine loss of
participation. The neutral gray state marks bars where
volume is too low to support either reading.
Settings
- Volume MA length: reference average for volume.
- Low-volume threshold: fraction of the volume MA below
which a bar is treated as noise. Raise it to filter more
aggressively.
- Trend MA length: default 50. Shorten it on fast intraday
charts if the color state lags the moves being traded.
- Trend MA type: EMA or SMA.
- Trend source: price series used for the trend MA.
Alerts
Two conditions are available: volume above its average
while price is above the trend MA, and the same while
price is below it.
This script is for chart analysis only and is not
investment advice.
instead of individual candle direction.
How it works
- A moving average of volume defines the reference level
(yellow line).
- A second moving average on price defines trend direction.
- Bars are green when price trades above the trend MA, red
when below, and gray when volume falls under the
low-volume threshold.
Why color by trend rather than by candle
Coloring volume by candle direction repeats information
already visible on the price chart: a red candle produces a
red bar, and nothing is added. Coloring by trend context
instead answers a different question, namely whether
participation is arriving in the direction the reader is
already tracking. A pullback inside an uptrend will show
red candles but green volume bars, which makes it easy to
separate a pause in an ongoing move from a genuine loss of
participation. The neutral gray state marks bars where
volume is too low to support either reading.
Settings
- Volume MA length: reference average for volume.
- Low-volume threshold: fraction of the volume MA below
which a bar is treated as noise. Raise it to filter more
aggressively.
- Trend MA length: default 50. Shorten it on fast intraday
charts if the color state lags the moves being traded.
- Trend MA type: EMA or SMA.
- Trend source: price series used for the trend MA.
Alerts
Two conditions are available: volume above its average
while price is above the trend MA, and the same while
price is below it.
This script is for chart analysis only and is not
investment advice.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.