HI,
Please help me convert this to a scan, results are displayed as a % on my watch list, I like to be able to scan for example for any stocks that are between 2% and 5%.
Thank you in advance
Please help me convert this to a scan, results are displayed as a % on my watch list, I like to be able to scan for example for any stocks that are between 2% and 5%.
Thank you in advance
Code:
# Difference in Percent Change vs SPX
# Select your choice of timeframe above
# current symbol change
def a = (close-close[1])/close[1];
# SPX change
def sym = close("SPX");
def b = (sym-sym[1])/sym[1];
# current symbol change minus SPX change
def c = a-b;
# gives the difference as a percent value
AddLabel(1,AsPercent(c),
if c > 0 then createcolor(0,204,75)
else if c == 0 then color.light_gray
else createcolor(250,90,0));
#end code
Last edited by a moderator: