SPDRS Sector Rotation
This scan uses the SPDRS sector ETFs to compare strength & weakness between sectors based on where each is trading relative to it's own 65 day SMA. Score is based on zero being the lower bollinger band and 100 the upper band.
input = "SPDRS.lst";
output = "SPDRSrank.lst";
daystoload=150;
DaysRequired=150;
Float A, X, Y, Z;
X:=MovAvg(0,65,cl)-(StDev(0,-65)*3);
Y:=MovAvg(0,65,cl)+(StDev(0,-65)*3);
A:=Close(0) - X;
Z:=A/(Y-X);
Printhdrln "Score,SPDR Description,Close Today,Close One Week Ago,Difference, % Chg,Symbol";
If Close (0) >0
then
Println Z*100:5:2,",",description,",",Close(0):6:2,",",Close(-5):6:2,",",Close(0)-Close(-5):5:2,",",((Close(0)/Close(-5))-1)*100:3:2,",",Symbol;
endif;
SPDRS Sector Rotation
This scan uses the SPDRS sector ETFs to compare strength & weakness between sectors based on where each is trading relative to it's own 50 day SMA. Score is based on zero being the lower bollinger band and 100 the upper band.
input = "SPDRS.lst";
output = "SPDRSrank.lst";
daystoload=150;
DaysRequired=150;
Float A, X, Y, Z;
X:=MovAvg(0,50,cl)-(StDev(0,-50)*3);
Y:=MovAvg(0,50,cl)+(StDev(0,-50)*3);
A:=Close(0) - X;
Z:=A/(Y-X);
Printhdrln "Score,SPDR Description,Close Today,Close One Week Ago,Difference, % Chg,Symbol";
If Close (0) >0
then
Println Z*100:5:2,",",description,",",Close(0):6:2,",",Close(-5):6:2,",",Close(0)-Close(-5):5:2,",",((Close(0)/Close(-5))-1)*100:3:2,",",Symbol;
endif;