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 -- Ignore unavailable to you. Want to Upgrade?


To: Jeff Grover who wrote (3143)1/19/1998 7:29:00 PM
From: TechTrader42  Respond to of 11149
 
And -50.51 for the older QP CCI scan. Note the /3:

//CCI(13) -- calculate values

output="ccicross.lst";
input="portfoli.lst";
daystoload = 250;

float cci, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm;

B :=(high(0)+low(0)+close(0))/3 ;
C :=(high(-1)+low(-1)+close(-1))/3 ;
D :=(high(-2)+low(-2)+close(-2))/3 ;
E :=(high(-3)+low(-3)+close(-3))/3 ;
F :=(high(-4)+low(-4)+close(-4))/3 ;
G :=(high(-5)+low(-5)+close(-5))/3 ;
H :=(high(-6)+low(-6)+close(-6))/3 ;
I :=(high(-7)+low(-7)+close(-7))/3 ;
J :=(high(-8)+low(-8)+close(-8))/3 ;
K :=(high(-9)+low(-9)+close(-9))/3 ;
L :=(high(-10)+low(-10)+close(-10))/3 ;
M :=(high(-11)+low(-11)+close(-11))/3 ;
N :=(high(-12)+low(-12)+close(-12))/3 ;
O :=(high(-13)+low(-13)+close(-13))/3 ;
P :=(high(-14)+low(-14)+close(-14))/3 ;
Q :=(high(-15)+low(-15)+close(-15))/3 ;
R :=(high(-16)+low(-16)+close(-16))/3 ;
S :=(high(-17)+low(-17)+close(-17))/3 ;
T :=(high(-18)+low(-18)+close(-18))/3 ;
U :=(high(-19)+low(-19)+close(-19))/3 ;
V :=(high(-20)+low(-20)+close(-20))/3 ;
W :=(high(-21)+low(-21)+close(-21))/3 ;
X :=(high(-22)+low(-22)+close(-22))/3 ;
Y :=(high(-23)+low(-23)+close(-23))/3 ;
Z :=(high(-24)+low(-24)+close(-24))/3 ;

aa :=(B+C+D+E+F+G+H+I+J+K+L+M+N)/13 ;
bb :=(C+D+E+F+G+H+I+J+K+L+M+N+O)/13 ;
cc :=(D+E+F+G+H+I+J+K+L+M+N+O+P)/13 ;
dd :=(E+F+G+H+I+J+K+L+M+N+O+P+Q)/13 ;
ee :=(F+G+H+I+J+K+L+M+N+O+P+Q+R)/13 ;
ff :=(G+H+I+J+K+L+M+N+O+P+Q+R+S)/13 ;
gg :=(H+I+J+K+L+M+N+O+P+Q+R+S+T)/13 ;
hh :=(I+J+K+L+M+N+O+P+Q+R+S+T+U)/13 ;
ii :=(J+K+L+M+N+O+P+Q+R+S+T+U+V)/13 ;
jj :=(K+L+M+N+O+P+Q+R+S+T+U+V+W)/13 ;
kk :=(L+M+N+O+P+Q+R+S+T+U+V+W+X)/13 ;
ll :=(M+N+O+P+Q+R+S+T+U+V+W+X+Y)/13 ;
mm :=(N+O+P+Q+R+S+T+U+V+W+X+Y+Z)/13 ;

cci := (B-aa)/(0.015*(abs(B-aa)+abs(C-bb)+abs(D-cc)+abs(E-dd)+abs(F-ee)+abs(G-ff)+abs(H-gg)+abs(I-hh)+abs(J-ii)+abs(K-jj)+abs(L-kk)+abs(M-ll)+abs(N-mm))/13+.00001);

//if
//(B-R)/(0.015*(abs(B-R)+abs(C-S)+abs(D-T)+abs(E-U)+abs(F-V)+abs(G-W)+abs(H-X)+abs(I-Y)+abs(J-Ya)+abs(K-Yb)+abs(L-Yc)+abs(M-Yd)+abs(N-Ye))/13)<-100 then
//println symbol,", ",description,", ",close(0); endif;

Println Symbol, ": ", cci:8:2;



To: Jeff Grover who wrote (3143)1/19/1998 7:32:00 PM
From: TechTrader42  Respond to of 11149
 
Eliot sent this comparison (under "Eliot" are the results from the older
CCI scan for QP):

Eliot Meta
AAP -9.709 -9.690
ACTC 137.082 147.721
ADVH -7.3021 -8.108
AND -270.512 -256.659
BCOM -22.337 -25.012
BYD 184.380 -180.375
CEXP -79.453 -79.757
DFC -74.802 -76.493
EGHT 6.5013 6.325
FPF 111.356 111.356



To: Jeff Grover who wrote (3143)1/19/1998 8:26:00 PM
From: TechTrader42  Respond to of 11149
 
The root of the B mystery (I just love a B mystery!) lies not in B, but in aa. I don't mean to say that I'm in need of Alcoholics Anonymous, but that there's something not quite right about aa either (aside from the twelve steps) -- and the mysterious B (not me -- I'm too variable) seems to compensate for it.

aa:=aa+((high(days)+low(days)+close(days))/periods)/periods;

Note that once again, it would seem to make sense that 3 is missing. I think it should go where the first "periods" is. Then you'd have 3 instead of periods with B, and
aa:=aa+((high(days)+low(days)+close(days))/3)/periods.

Unfortunately, it's not as simple as that, because the values get thrown off (and no longer match Wow's). Why, though, are the values so close to Wow's with the error? Who knows.

I'll continue to work on it. I'm considered a hopeless case here in the mental ward, and the orderlies no longer pester me. I have all the time in the world.

Brooke



To: Jeff Grover who wrote (3143)1/19/1998 8:32:00 PM
From: Richard Estes  Respond to of 11149
 
those look like the type figures I have seen at times. Replace eyeball with data window.



To: Jeff Grover who wrote (3143)1/19/1998 8:47:00 PM
From: Bob Jagow  Read Replies (1) | Respond to of 11149
 
Jeff,
The 7-step algorithm for CCI posted on Equis\A to Z\ uses abs correctly [as per Lambert] and I assume this is used for CCI-STd.
No idea where the [incorrect] abs(first - second) version came from.

IHMO the main purpose for programming CCI in Q+ is to show the inadequacy (esp. lack of arrays) of its present implementation. :-)

Bob



To: Jeff Grover who wrote (3143)1/19/1998 8:53:00 PM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
Jeff: Mystery solved. I went hog-wild when I substituted "periods" for "3."
Here's a fixed version of the CCI variable scan:


input="portfoli.lst";
output="ccivar.lst";

daystoload = 250;

float periods, cci, first, second, total, B, aa;
integer days,dday,d;

periods:=13; // set to any old number you want; this is the period for CCI

for dday = 0 to -1 step -10 do // -10 gives CCI values for 11 days; change to -1 if you want only today and yesterday's value for CCI

B :=(high(dday)+low(dday)+close(dday))/3;

aa:=0;
for days=dday to dday-(periods-1) step -1 do
aa:=aa+((high(days)+low(days)+close(days))/3)/periods;
next days;

second:=0;
first:=0;
total:=0;

for days=dday to dday-(periods-1) step -1 do
second :=0;
for d = days to days-(periods-1) step -1 do
second := second + ((high(d)+close(d)+low(d))/3)/periods;
next d;
first:=(high(days)+low(days)+close(days))/3;
total:=total+abs(first-second);
next days;

cci:=(B-aa)/(0.015*(total)/periods+.00001);

println Symbol, " , ",dday," , ",cci;
next dday;

//Println Symbol, ": ", cci:8:2;