edit: Used the code from vgladkov. Thankyou. Seems to be working just how I wanted. Thanks again.
This indicator will place a bar overlay on the candlesticks if the volume meets with the criteria. Volume at 30,000 or less, no overlay just default bar colours, volume at 30,000 to 100,000 the bar changes to bullish yellow and bearish blue, volume over 100,001 will be white, for both bullish and bearish. This helps to show that volume is picking up for the stock. I’ve got so far, but having trouble adding the code for the 100,001+ volume. Can someone shed some light on what I need to add. Thanks
//@version=5
indicator("Cadle Stick Assistant", shorttitle = "CSA", overlay=true)
//inputs
bullishcolor = input(color.rgb(234, 238, 20), "Bullish Color")
bearishcolor = input(color.rgb(59, 177, 255), "Bearish Color")
uvcolor = input(color.rgb(255, 255, 255), "Ultra Volume Color")
percentbreakoutcolor = input(color.rgb(255, 0, 255), "Breakdown Color")
percentthreshold = input(4.0, "Percentage Threshold", tooltip="The minimum percentage decrease for a candle to be highlighted.")
minvol = input(30000, "Min Volume", tooltip = "The minimum volume needed to generate a bar colour change.")
maxvol = input(100000, "Max Volume", tooltip = "The maximum volume needed to generate a bar colour change.")
ultravolume = input(100001, "Ultra Volume", tooltip = "Default volume set at 100,000 shares.")
// calculations
percentchange = math.abs(close - open) / open * 100
truepercent = (close - open) / open * 100
color barcolor = na
// conditions
bullishCond = close >= open
bearishCond = close < open
ultravolCond = volume > ultravolume
mediumvolCond = volume > minvol and volume <= maxvol
breakdownvolCond = percentchange > percentthreshold
switch
breakdownvolCond and bearishCond => barcolor := percentbreakoutcolor
ultravolCond => barcolor := uvcolor
mediumvolCond and bullishCond => barcolor := bullishcolor
mediumvolCond and bearishCond => barcolor := bullishcolor
// Plot volume indication
barcolor(barcolor)````
I'm not sure where to add the 100,001+ code in the if statements and also in the barclolor statement.