I want to scan for stocks that have greater YTD % change compared to SPY, but somehow it shows me "no such variable" error for the "PercentChg". But after I check, it is a valid variable. May I know how can I resolve this issue?
The thinkscript that I have written in TOS stock scanner is as follow:
The thinkscript that I have written in TOS stock scanner is as follow:
Code:
PercentChg is greater than or equal to PercentChg("SPY") within 252 bars