Craig, What could I add to exclude the stocks selected by this code that have missed at least one of these conditions from day -16 thru -120. It may not be quite as simple as you think. Your scan finds all NYSE,Nasdaq stocks which, on at least one day in the last 15 days, all of your selection criteria were met. If you output this scan to "TEMP.LST", and then create another scan which reads that as input, QP can do what you want and filter the first set of stocks. But, the second scan must select what you WANT, not what to exclude. The Allgroup will make those criteria lines required. So, any that have missed at least one of these conditions will be excluded.
On the bright side, it will be much easier with QP2 because you have loops and if statements.
Enjoy! Paul
Input="TEMP.LST" AllGroup Close(-16)>max(-21,-61,hi) AvgVol(-16,-20)>1.2*(AvgVol(-21,-30)) Close(-16)>MovAvg(-16,150,cl)
Close(-17)>max(-21,-62,hi) AvgVol(-17,-21)>1.2*(AvgVol(-22,-31)) Close(-17)>MovAvg(-17,150,cl)
... and on and on and on and on and on ... for days -18 through -120 ... I wonder if QP can even handle this many conditions! |