I searched the forum and found a couple of threads that were similar but do not solve the problem described in the first two lines here:
#test to see can I get the close on a specific previous date
# answer seems to be no, I can only get it for a specific # of days back since what goes in the bracket on close[] has to be a constant and cannot be a variable
# specifc scan shows all stocks w/ close < 105 and < 105 on a specificdate NUMBER OF DAYS BACK
input BeginDate = 20220722;
def nd = DaysFromDate(BeginDate);
def x = close[5]; # I WANT THE 5 TO BE ND
plot z = if x > 100.0 and x < 105.0 then x else Double.NaN;
is there any way around this limitation?
#test to see can I get the close on a specific previous date
# answer seems to be no, I can only get it for a specific # of days back since what goes in the bracket on close[] has to be a constant and cannot be a variable
# specifc scan shows all stocks w/ close < 105 and < 105 on a specific
input BeginDate = 20220722;
def nd = DaysFromDate(BeginDate);
def x = close[5]; # I WANT THE 5 TO BE ND
plot z = if x > 100.0 and x < 105.0 then x else Double.NaN;
is there any way around this limitation?