SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Craig DeHaan who wrote (8713)2/23/1999 1:22:00 AM
From: Bob Jagow  Read Replies (3) of 11149
 
Craig,
Believe you get "issues hitting 8 yr high CCI(21) value in the past
10 days with a closing price 33% less than 8 yr max" by the code
below.
Still not the speediest because has to go all the way back to
confirm that CCI is max.
Will leave TF+ version for another day. -Bob
---
// High CCI21 w/ Price Divergence rediddled by dr j
exchange = nyse, amex, nasdaq;
output = "CCImax.lst";
daystoload = 2000; // 8 years. Note 3000 days (12 years) now available
daysrequired =30;
Integer firstday, i, CCIdate, printflag;
float maxHi, maxCCI;

set CCI = 21;
firstday :=((DaysLoaded-1)*-1);
maxHi := max(0, firstday, cl);

maxCCI := -999;
for i= 0 to -9 step -1 do
if cci(i) > maxCCI then
maxCCI := cci(i); // trust me
CCIdate := i;
endif;
next i;
printflag := 0;
if close(CCIdate) < .66*maxHi then // 1st condition
printflag := 1;
for i = -10 to firstday step -1 do
if cci(i) > maxCCI then // failed 2nd condition
i := firstday;
printflag := 0;
endif;
next i;
endif;
if printflag = 1 then
Println Symbol:-5,",",maxCCI:6:2,",",maxHi:6:2,",",
close(CCIDate):6:2,",",date(CCIDate);
endif;
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext