I have this study that display the percent change from the open. I would like to create a column in my watchlist that displays the percent change only. Can someone assist with altering the code to achieve this. Thank you kindly.
I posted this with the possiblity to seek assistance if anyone can help me code a watchlist column that will show the percent change when the market opens. The code above does this however I'm not sure how to convert it into a watchlist column.
Can someone assist. Thank you kindly
Code:
input period_Type = AggregationPeriod.DAY;
def begin = open(period = period_Type);
def end = close(period = period_Type);
def NetChg = end - begin;
def PctChg = (end / begin) - 1;
AddLabel(yes, "Open Net Change: " + NetChg + " (" + AsPercent(PctChg) + ")", if NetChg > 0 then Color.GREEN else if NetChg < 0 then color.RED else color.LIGHT_GRAY);
I posted this with the possiblity to seek assistance if anyone can help me code a watchlist column that will show the percent change when the market opens. The code above does this however I'm not sure how to convert it into a watchlist column.
Can someone assist. Thank you kindly