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: Jan Robert Wolansky who wrote (3849)4/5/1998 11:28:00 PM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
I don't know of a CCI scan for the older version, To give you an idea
of what's involved, here's the formulation for WOW: (typ() -
mov(typ(),13,s))/(.015*mov(abs( (typ() - mov(typ(),13,s)) ),13,s))

That's not easily formulated in a scan, but here's one way of doing it
in QP2 (thanks to John Sugas):

//cci crossing up through -100
//by John Sugas

output="ccicross.lst";
input="portfoli.lst";
issuetype=common;
exchange nyse,nasdaq,amex;
daystoload = 250;

float cci, cciprev, 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, ZZ, aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm, nn;

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 ;
ZZ :=(high(-25)+low(-25)+close(-25))/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 ;
nn :=(O+P+Q+R+S+T+U+V+W+X+Y+Z+ZZ)/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);
cciprev := (C-bb)/(0.015*(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)+abs(O-nn))/13+.00001);

if cci<200 then
Println Symbol, ": ", cci:8:2, ",", cciprev:8:2;
endif;