Percent Change Label for symbol other than symbol plotted on chart?

M

Mike

New member
I currently display a Percent Change Label for the "SPY" on a 30Min chart of "SPY". Script is as follows:

def PC = close(period = AggregationPeriod.DAY)[1]; def PctChange = (close - PC) / PC; AddLabel(1, "SPY: " + AsPercent(PctChange), if PctChange > 0 then Color.Dark_Green else if PctChange 0 then Color.Dark_Red else Color.Orange);

QUESTION: In addition to the displaying the Percent Change Label for the plotted symbol (SPY), I'd like to display the Percent Change Label for a symbol other than SPY comparison purposes. Any insight would be appreciated!
 
Last edited by a moderator:

Similar threads

Top