Sorry, Jan, I missed your point.
Max(0 -daysloaded +1, hi) works fine; the problem is indeed a parse-time bug like Brooke and I found for the recent slope scan. (Where I had to add a positive # aa a kludge in post #5268 b:= .0001+(num/den); kludge.)
You can see this with -------------------------------------- //JVH stock data Scan by JVH output = "jvh-stocks-out.lst"; Float EMA17, EMA50, EMA200; Integer NumDays; DaysToLoad = 300; daysRequired = 250; //always good idea to avoid bounds stop NumDays:=-.5*(DaysLoaded-1); Println DaysLoaded,",", NumDays, ",", Max(0, -1 + NumDays ,hi); ------------------------------- where this -1 tricked the parser into accepting Numdays.
Bob |