Alan,
Maybe Sean can speed shift this one into the 21st century; something I was fumbling with last night to rig around a nontoken status based on his Max/Min scan. Don't try running this if you need results in < 6 hours. But we know Gary will offer more than token solutions in future program incarnations.
Craig
// High CCI21 w/ Price Divergence exchange = nyse, amex, nasdaq; output = "CCImax.lst";
//input="250vol.lst"; // ProcessMS = "d:metav\hiCCI\",VMS;
daystoload = 2200; daysrequired =30;
Integer numdays,i,minDate, maxDate, maxCCIDate; float maxHi, maxCCI;
numdays:=((DaysLoaded-1)*-1);
set CCI = 21; maxHi:= max(0, numdays, cl);
maxCCI := 0; maxCCIDate :=0; maxDate := 0;
for i=numdays to 0 step 1 do if cci(i) > maxCCI then maxCCI := cci(i); maxCCIDate := i; //i:=0; endif; next i;
for i=numdays to 0 step 1 do if close(i) >= maxHi then maxHi := close(i); maxDate := i; i:=0; endif; next i;
for i=-10 to 0 step 1 do If CCI(i)>=MaxCCI and close(MaxCCIDate)< close(maxDate)*.66 then
Println Symbol:-5,",","cl:0",",",close(0):6:2,",","Max","," ,close(maxDate):6:2,",MaxDate,",Date(maxDate), "," ,"MaxCCI", "," ,CCI(MaxCCIDate):6:2, "," ,"Close" , "," ,close(MaxCCIDate), "," ,Date(MaxCCIDate);
endif; next i; |