#Chris' Enhanced Volume V.2 /w Uptick/Downtick
#streamlined by @MerryDay 2/2020 only displays Daily Volume and who is in charge
declare lower;
declare real_size ;
##############################
# UPTICK / DOWNTICK CRITERIA #
##############################
input VolAgg = AggregationPeriod.DAY ;
def Buying = volume * (close - low) / (high - low);
def Selling = volume * (high - close) / (high - low);
def DailyVol = volume("period" = VolAgg);
def AvgVol = Average(DailyVol,50) ;
#################
# Formatting
#################
DefineGlobalColor("LabelGreen", CreateColor(0, 165, 0)) ;
AddLabel(yes, "AvgVol = " +Round(AvgVol,0) +" | " +"DailyVol = " + Round(DailyVol, 0), color.violet);
AddLabel(buying>selling, "Buy %: " + Round((Buying/(Buying+Selling))*100,2) , GlobalColor("LabelGreen"));
AddLabel(selling>buying, "Sell %: " + Round((Selling/(Selling+Buying))*100,2) , color.RED);
plot scan = Buying > Selling ;
scan.hide();