Gonzongo: Talk about WAY COOL:
"R2 will be here shortly. The cd's are being pressed now, the manual is being printed now, and the new web site is being developed now."
I'll celebrate with this new WMA Stochastics scan, which gives values for two StochRSI's -- for example StochRSI(8,5) and StochRSI(10). Why would I pick those, Gonzongo????
This just gives the values, but you can tailor it to your needs by adding StochRSI>30, etc.
//StochRSI (Variable with WMA), by Brooke
output="srsivar.lst"; input="portfoli.lst";
daystoload= 250;
integer i, j; float weight, maperiod1, maperiod2, total, totaldays, StochRSI,PrvStRSI, PrvPrvSRSI, //These are for first StochRSI StochRSI2, PrvStRSI2, PrvPrvSRSI2, //These are for second StochRSI maperiod1a, maperiod2a, weighta, totala, totaldaysa;
//SET MA'S FOR FIRST STOCHRSI maperiod1:=8; //set MA: e.g., in StochRSI(8,5), set for 8; in StochRSI(10), set for 10 maperiod2:=5;// set MA: e.g., in StochRSI(8,5), set for 5; in StochRSI(10), set for 10
set rsi = maperiod1;
//SET MA'S FOR SECOND STOCHRSI -- Second RSI is automatically set below when you set periods maperiod1a:=10; //set MA: e.g., in StochRSI(8,5), set for 8; in StochRSI(10), set for 10 maperiod2a:=10;// set MA: e.g., in StochRSI(8,5), set for 5; in StochRSI(10), set for 10
weight:=0; total:=0; for i = maperiod2 to 1 step -1 do total:= total + i; next i; totaldays:=total;
StochRSI:=0; PrvStRSI:=0; PrvPrvSRSI:=0; for j = maperiod2 to 1 step -1 do weight:=((j/totaldays)*100); StochRSI:=StochRSI+((rsi(j-maperiod2)-min(j-maperiod2,(j-maperiod2)-(maperiod1-1),rsi))/ (.000001+max(j-maperiod2,(j-maperiod2)-(maperiod1-1),rsi)-min(j-maperiod2,(j-maperiod2) -(maperiod1-1),rsi))*(weight)); PrvStRSI:=PrvStRSI+((rsi(j-(maperiod2+1))-min(j-(maperiod2+1),(j-maperiod2)-(maperiod1),rsi))/ (.000001+max(j-(maperiod2+1),(j-maperiod2)-(maperiod1),rsi)-min(j-(maperiod2+1),(j-maperiod2) -(maperiod1),rsi))*(weight)); PrvPrvSRSI:=PrvPrvSRSI+((rsi(j-(maperiod2+2))-min(j-(maperiod2+2),(j-maperiod2)-(maperiod1+1),rsi))/ (.000001+max(j-(maperiod2+2),(j-maperiod2)-(maperiod1+1),rsi)-min(j-(maperiod2+2),(j-maperiod2) -(maperiod1+1),rsi))*(weight)); next j;
println symbol, " StochRSI ", maperiod1:2, ": ", StochRSI:6:2, ", ", "PrvStRSI: ", PrvStRSI:6:2, ", ", "PrvPrvSRSI: ", PrvprvSRSI:6:2, ", ", "RSI: ", rsi(0);
set rsi = maperiod1a;
weighta:=0; totala:=0; for i = maperiod2a to 1 step -1 do totala:= totala + i; next i; totaldaysa:=totala;
StochRSI2:=0; PrvStRSI2:=0; PrvPrvSRSI2:=0; for j = maperiod2a to 1 step -1 do weighta:=((j/totaldaysa)*100); StochRSI2:=StochRSI2+((rsi(j-maperiod2a)-min(j-maperiod2a,(j-maperiod2a)-(maperiod1a-1),rsi))/ (.000001+max(j-maperiod2a,(j-maperiod2a)-(maperiod1a-1),rsi)-min(j-maperiod2a,(j-maperiod2a) -(maperiod1a-1),rsi))*(weighta)); PrvStRSI2:=PrvStRSI2+((rsi(j-(maperiod2a+1))-min(j-(maperiod2a+1), (j-maperiod2a)-(maperiod1a),rsi))/ (.000001+max(j-(maperiod2a+1),(j-maperiod2a)-(maperiod1a),rsi)-min(j-(maperiod2a+1), (j-maperiod2a)-(maperiod1a),rsi))*(weighta)); PrvPrvSRSI2:=PrvPrvSRSI2+((rsi(j-(maperiod2a+2))-min(j-(maperiod2a+2), (j-maperiod2a)-(maperiod1a+1),rsi))/ (.000001+max(j-(maperiod2a+2),(j-maperiod2a)-(maperiod1a+1),rsi)-min(j-(maperiod2a+2), (j-maperiod2a)-(maperiod1a+1),rsi))*(weighta)); next j;
println symbol, "StochRSI2 ", maperiod1a:2, ": ", StochRSI2:6:2, ", ", "PrvStRSI2: ", PrvStRSI2:6:2, ", ", "PrvPrvSRSI2: ", PrvprvSRSI2:6:2, ", ", "RSI: ", rsi(0); |