Note: For this ThinkorSwim version, I have made changes to the coloring a bit.
- LIGHT GREEN = WHITE and Orange = BLUE
Most of the time traders are confused about if the price movements were supported by VOLUME. This indicator colors the bars into volume weighted signals...When prices go down bars are red and controversially when up, bars are green. Additionally we have two more colors for each situation:
- DARK RED when prices go down and VOLUME is bigger than 150% of its (default 21 day) average, that indicates us price action is supported by a strong BEARISH VOLUME
- RED when prices go down and VOLUME is BETWEEN 50% AND 150% of its (default 21 day) average, at this situation we can think that volume is neither strong nor weak
- ORANGE when prices go down and VOLUME is just less than 50% of its (default 21 day) average, so the volume is weak and doesn't support the price action much
- DARK GREEN when prices go UP and VOLUME bigger than 150% of its (default 21 day) average, that indicates us price action is supported by a strong BULLISH VOLUME
- GREEN when prices go UP and VOLUME is BETWEEN 50% AND 150% of its (default 21 day) average, at this situation we can think that volume is neither strong nor weak
- LIGHT GREEN when prices go UP and VOLUME is just less than 50% of its (default 21 day) average, so the volume is weak and doesn't support the price action much
thinkScript Code
Code:
# Volume Based Coloured Bars
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/8RPiMMmn-Volume-Based-Coloured-Bars/
# Note: LIGHT GREEN = WHITE and Orange = BLUE
input length = 21;
def avrg = simpleMovingAvg(volume, length);
def vold1 = volume > avrg * 1.5 and close<open;
def vold2 = volume >= avrg*0.5 and volume<=avrg*1.5 and close<open;
def vold3 = volume < avrg *0.5 and close<open;
def volu1 = volume > avrg*1.5 and close>open;
def volu2 = volume >= avrg * 0.5 and volume<=avrg*1.5 and close>open;
def volu3 = volume < avrg * 0.5 and close>open;
assignPriceColor(if vold1 then color.dark_red else if vold2 then color.red else if vold3 then color.blue else if volu1 then color.dark_green else if volu2 then color.uptick else if volu3 then color.white else color.CYAN);