Most of the time traders are confused about if the price movements were supported by .
This indicator colors the bars into weighted signals...
When prices go down bars are red and contraversely when up, bars are green. Additionally we have two more colors for each
PRICE BARS ARE:
DARK RED when prices go down and is bigger than 150% of its (default 21 day) average, that indicates us price action is supported by a strong
RED when prices go down and is BETWEEN 50% AND 150% of its (default 21 day) average, at this situation we can think that is neither strong nor weak
ORANGE when prices go down and is just less than 50% of its (default 21 day) average, so the is weak and doesn't support the price action much
DARK GREEN when prices go UP and bigger than 150% of its (default 21 day) average, that indicates us price action is supported by a strong
GREEN when prices go UP and is BETWEEN 50% AND 150% of its (default 21 day) average, at this situation we can think that is neither strong nor weak
LIGHT GREEN when prices go UP and is just less than 50% of its (default 21 day) average, so the is weak and doesn't support the price action much
21 day used as default value which can be changed in the settings menu,
21 day is considered as a month for STOCK Markets, it would be more accurate to set the value to 30 for CRYPTO CURRENCIES
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
Is there anyway to modify the script in order to include alerts for when the candle changes color? For instance an alert To when the candle turns dark Red or dark green?
study("Volume Based Coloured Bars", title="VCB", overlay=true)
length=input(21, "length", minval=1)
style = input(title="color based on:", defval="Open" ,options =)
isred = style == "Last close" ? change(close) < 0 : close < open
isgreen = not isred
highvolume = volume > avrg*1.5
lowvolume = volume < avrg/1.5
mediumvolume = not (highvolume or lowvolume)
vold1 = highvolume and isred
vold2 = mediumvolume and isred
vold3 = lowvolume and isred
volu1 = highvolume and isgreen
volu2 = mediumvolume and isgreen
volu3 = lowvolume and isgreen
color = vold1 ? cold1 : vold2 ? cold2 : vold3 ? cold3 : volu1 ? colu1 : volu2 ? colu2 : volu3 ? colu3 : na
Script could not be translated from: )|E|
|B|isred = style