I have used the search throughout the web and this forum to find solutions. Guess I really don't understand things. Through search, I have found that I should use either AsPercent( ) or the +"%" in my code. I have tried inserting that in the codein many different places, but to no avail. The code (below) shows the correct results in the column but wish it would have a % symbol after each result. Also, the two decimal places work but if the last decimal is a zero, it only shows one ( EX: 11.50 shows up 11.5 ).
Here are the two different codes I'm working on:
FIRST
SECOND
Any help much appreciated!
Gotta learn.
Here are the two different codes I'm working on:
FIRST
Code:
def high_52_week = highest(high, 252);
def percent_off = (close - high_52_week) / high_52_week * 100;
plot percent = percent_off;
SECOND
Code:
plot YTDPercentChange = round((((close - close(period = AggregationPeriod.YEAR)[1]) / close(period = AggregationPeriod.YEAR)[1]) * 100),2);
Any help much appreciated!
Gotta learn.