Jan, For those of us still using the manual crank start version:
//CCI(13) crossing over -150 by John Sugas from Silicon Investor Discussion Group
input="qrs.lst"
float B, C, D, E, F, G, H, I, J, K, L, M, N, P float S, T, A
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 P :=(high(-13)+low(-13)+close(-13))/3 S :=(B+C+D+E+F+G+H+I+J+K+L+M+N)/13 T :=(C+D+E+F+G+H+I+J+K+L+M+N+P)/13 A :=(B-S)/(.000001+(0.015*((ABS(B-S))+(ABS(C-S))+(ABS(D-S))+(ABS(E-S))+(ABS(F-S))+(ABS(G-S))+(ABS(H-S))+(ABS(I-S))+(ABS(J-S))+(ABS(K-S))+(ABS(L-S))+(ABS(M-S))+(ABS(N-S))))/13)
Allgroup
Close(0)>0 (B-S)/(.000001+(0.015*((ABS(B-S))+(ABS(C-S))+(ABS(D-S))+(ABS(E-S))+(ABS(F-S))+(ABS(G-S))+(ABS(H-S))+(ABS(I-S))+(ABS(J-S))+(ABS(K-S))+(ABS(L-S))+(ABS(M-S))+(ABS(N-S)))/13))> -150 (C-T)/(.000001+(0.015*((ABS(C-T))+(ABS(D-T))+(ABS(E-T))+(ABS(F-T))+(ABS(G-T))+(ABS(H-T))+(ABS(I-T))+(ABS(J-T))+(ABS(K-T))+(ABS(L-T))+(ABS(M-T))+(ABS(N-T))+(ABS(P-T)))/13))< -150 //println symbol,", ",description,", ",close(0),", ",a:4:3 Println Symbol:-6," Close:",close(0):7:3," QRS:", qrs(0):3:0," CCI(13)= ",A:8:3," ", description:-12
=============== Below the Allgroup and Close(0)>0 lines change the (B-S) line end value to <200 and comment out the (C-T) line altogether if you're not looking for specific value crossovers. Watch the funky wordwrap. |