We have lots of problems, David :o) First, my --- if ( cci(0) > -150 and cci(-1) < -150 ) or ( cci(0) > -150 and cci(-2) < -150 ) then --- "catches those plus those that happened to be -150 last week." was pure nonsense; it, of course, catches what Michael's did -- last two weeks. So throw out the 2nd line -- too much of a bother to snare those that happened to be -150 last week. ---- input="spindex.lst"; output = "ccispindex.lst"; set CCI=13; weekly; daystoload=1000; daysrequired=550; if cci(0) > -150 and cci(-1) < -150 then println symbol,",",description; endif; ---- This scan will work fine on daily data, but the SP data [your spindex.lst] is weekly! , so you get !SP-MM.
//weekly gives !SP-E, !SP-NB, and !SP-SL, which is what I think you want -- a 13 period CCI on weekly data.
Bob |