I have the following code and I would like to remove "Percent down off high" from my watchlist, I just want the number only.
Thanks
#HINT: This chart label shows the percent change down from the high.above \n\n IMPORTANT: If a new IPO you need to change the length to max of number of days since IPO release.
input length = 52; #HINT length: There are 252 trading days in a year
input show_label = yes;
input Label_Color_Choice = {"magenta", "green", "pink", "cyan", "orange", default "red", "blue", "gray", "violet"};
def top = highest(high(period = AggregationPeriod.WEEK), length);
def prctDrop = ((close(period = AggregationPeriod.week)/top)-1);
def NewHigh = high == top;
AddLabel(show_label and !NewHigh, "Percent down off high: ( " + AsPercent(prctDrop) + " ) ", GetColor(Label_Color_Choice));
AddLabel(show_label and NewHigh, "new 52-week high TODAY", (CreateColor(51, 204, 0)));
Thanks
#HINT: This chart label shows the percent change down from the high.above \n\n IMPORTANT: If a new IPO you need to change the length to max of number of days since IPO release.
input length = 52; #HINT length: There are 252 trading days in a year
input show_label = yes;
input Label_Color_Choice = {"magenta", "green", "pink", "cyan", "orange", default "red", "blue", "gray", "violet"};
def top = highest(high(period = AggregationPeriod.WEEK), length);
def prctDrop = ((close(period = AggregationPeriod.week)/top)-1);
def NewHigh = high == top;
AddLabel(show_label and !NewHigh, "Percent down off high: ( " + AsPercent(prctDrop) + " ) ", GetColor(Label_Color_Choice));
AddLabel(show_label and NewHigh, "new 52-week high TODAY", (CreateColor(51, 204, 0)));
Last edited by a moderator: