Group Movers
Using an input file of the 198 Industry Groups, this scan shows which group are moving up or down based on whether or not the 17 day simple moving average has crossed up or down through the 50 day simple moving average. By Dennis A. Kranyak, http://www.
input = "irlgrps.lst";
output = "grpm.lst";
daystoload=150;
DaysRequired=150;
Printhdrln "Group,Group Symbol,Close,Close a Week Ago,QP2 Symbol,Direction";
String U,D;
If MovAvg(0,17,cl) > MovAvg(0,50,cl) and
MovAvg(-1,17,cl) \< MovAvg(-1,50,cl)
then
u:="Up";
Println description,",",Close(0),",",Close(-4),",",Symbol,",",U;
endif;
If MovAvg(0,17,cl) \< MovAvg(0,50,cl) and
MovAvg(-1,17,cl) > MovAvg(-1,50,cl)
then
D:="Down";
Println description,",",Close(0),",",Close(-4),",",Symbol,",",D;
endif;