Volume Upticks
#SniperTrades Volume Upticks
# Volume Based Coloured Bars
# Note: DARK 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.red else if vold2 then color.dark_red else if vold3 then color.dark_red else if volu1 then color.uptick else if volu2 then color.dark_green else if volu3 then color.dark_green else color.CYAN);
# ©SniperTrades 2022