I need help with a script edit. I use the sell volume percent script below as a column on a watchlist. Problem is it won't do numerical sequence correctly. I have attached a screenshot that shows numbers out of sequence. It appears to not differentiate between the number of digits in the number. Can anyone assist with this please? Thank you.
Code:
input ShowSellVolumePercent = yes;
def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def buying = V*(C-L)/(H-L);
def selling = V*(H-C)/(H-L);
#Volume Data
def today = volume(period = "DAILY");
def curVolume = volume;
def SellVolPercent = Round((Selling / Volume) * 100, 0);
plot SellVolumePercentage = SellVolPercent;
SellVolumePercentage.SetDefaultColor(GetColor(5));
# Labels
AddLabel(ShowSellVolumePercent, + SellVolPercent, (if SellVolPercent >= 90 then Color.RED else if SellVolPercent <= 10 then Color.Green else Color.WHITE));
Alert(SellVolPercent crosses below 15, "", Alert.BAR, Sound.Ding);
Alert(SellVolPercent crosses above 85, "", Alert.BAR, Sound.Ding);
Code:
input ShowSellVolumePercent = yes;
def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def buying = V*(C-L)/(H-L);
def selling = V*(H-C)/(H-L);
#Volume Data
def today = volume(period = "DAILY");
def curVolume = volume;
def SellVolPercent = Round((Selling / Volume) * 100, 0);
plot SellVolumePercentage = SellVolPercent;
SellVolumePercentage.SetDefaultColor(GetColor(5));
# Labels
AddLabel(ShowSellVolumePercent, + SellVolPercent, (if SellVolPercent >= 90 then Color.RED else if SellVolPercent <= 10 then Color.Green else Color.WHITE));
Alert(SellVolPercent crosses below 15, "", Alert.BAR, Sound.Ding);
Alert(SellVolPercent crosses above 85, "", Alert.BAR, Sound.Ding);