# Label that shows SPY DIA QQQ and their % difference from yesterday?
# by tradecombine - 2021-10-02
# requested by rmmorgan @ usethinkscript
# Thread: https://usethinkscript.com/threads/label-that-shows-spy-dia-qqq-and-their-difference-from-yesterday.4862/
#
#
def SPY = close("SPY", period = AggregationPeriod.DAY);
def QQQ = close("QQQ", period = AggregationPeriod.DAY);
def DIA = close("DIA", period = AggregationPeriod.DAY);
AddLabel(yes, "SPY: " + SPY + " | " + AsPercent((SPY - SPY[1])/SPY[1]), Color.BLUE);
AddLabel(yes, "QQQ: " + QQQ + " | " + AsPercent((QQQ - QQQ[1])/QQQ[1]), Color.BLUE);
AddLabel(yes, "DIA: " + DIA + " | " + AsPercent((DIA - DIA[1])/DIA[1]), Color.BLUE);