[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Re:Coppock


  • Date: Mon, 15 Mar 2010 14:41:37 +1300
  • From: "Roy Larsen" <rlarsen@xxxxxxxxxx>
  • Subject: Re: [EquisMetaStock Group] Re:Coppock

PureBytes Links

Trading Reference Links



 
This indicator plots monthly values of Jay's Copock Model on a daily or monthly Dow chart, and by using the Security() function it can be plotted on any EOD or lower periodicity chart if sufficient data is loaded. Plotting on weekly charts may give slightly different results due to end-of-week dates not aligning precisely with end-of-month dates. 
 
Roy
 
 
 {Multi-Frame D Copock Model (Jay's)}
 {Requires Equis Forum DLL}
 {Adapted by Roy Larsen, 2010, 15/3/10}
 
 {User settings}
N:=Input("Multi-Frame D Copock Model (Jay's),  Periods 1",1,99,11);
R:=Input("Periods 2",1,99,14);
J:=Input("Months per Frame, (0 for Weekly frames)",0,12,1);
J:=If(J<5 OR Mod(J,3)=0 AND (J<>9),Int(J),-1);
G:=Input("End-of-week Offset (Weekly frames only)",0,6,0);
Q:=Input("Mode, 0=Static 1=Dynamic 2=Delayed",0,2,1);
 {Update on last bar, new bar or new frame}
 
 {Timing signals}
 {Day counter by metastocktools.com}
D:=DayOfWeek();M:=Month();Y:=Year();
Z:=Cum(1);F:=Rnd(Life(291231));
M:=If(J=0,ValueWhen(1,Z=1,F+D-G-1)-F,
(Y-ValueWhen(1,Z=1,Y))*12+M);
I:=If(J=0,Int(M/7),Int((M-1)/Max(1,J)));
I:=I>ValueWhen(2,1,I);
G:=LastValue(J<0 OR Lowest(Sum(I>0,5))=5);
I:=ExtFml("Forum.Sum",I,1);M:=G+I;
F:=ExtFml("Forum.Sum",Ref(I,1),1)*(M=0)*(Z>1)+G;
B:=LastValue(Z);A:=B-1=Z;B:=B=Z;
F:=F+B*(Q=0)*(J=0)*(D=5);
J:=If(F,1,(Alert(F,2)=0)*M*2*(Z>1));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2,M*2,J));
 
 {Frame CLOSE}
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
 
 {Price Rate of Change}
J:=J>0;
A:=ValueWhen(N+1,J,K);
B:=ValueWhen(R+1,J,K);
A:=(100*K/ValueWhen(1,A>0,A))-100;
B:=(100*K/ValueWhen(1,B>0,B))-100;
D:=(A+B)/2;
G:=(10*D+ 9*ValueWhen(2,J,D)+
8*ValueWhen(3,J,D)+ 7*ValueWhen(4,J,D)+
6*ValueWhen(5,J,D)+ 5*ValueWhen(6,J,D)+
4*ValueWhen(7,J,D)+ 3*ValueWhen(8,J,D)+
2*ValueWhen(9,J,D)+ ValueWhen(10,J,D))/55;
MA:=ExtFml("Forum.Mov",K,If(J,5,Pwr(10,10)),E);
MB:=ExtFml("Forum.Mov",K,If(J,10,Pwr(10,10)),E);
J:=J>0; A:=Cum(J);
Z:=Z-ValueWhen(13,J,Z);
MC:=ExtFml("Forum.Sum",J*K,Z)/12;
M1:=G>ValueWhen(3,J,G);
M2:=K>MC;
B:=Max((ValueWhen(2,J,MA)*.6666)+(K*.3333),MA);
D:=Max((ValueWhen(2,J,MB)*.82)+(K*.18),MB);
R:=Max(B-D,MA-MB);
M3:=R>ValueWhen(2,J,R); M1+M2+M3;
 
 
 
----- Original Message -----
From: Henry
Sent: Saturday, March 13, 2010 10:23 AM
Subject: [EquisMetaStock Group] Re:Coppock

 


this is Jay's Coppock Model

Per1:=Input("length ",1,100,11);
Per2:=Input("length ",1,105,14);
A1:=(ROC(C,Per1,%)+ROC(C,Per2,%))/2;
CG:=((A1*10)+(Ref(A1,-1)*9)+(Ref(A1,-2)*8)+(Ref(A1,-3)*7)+(Ref(A1,-4)*6)+(Ref(A1,-5)*5)+(Ref(A1,-6)*4)+(Ref(A1,-7)*3)+(Ref(A1,-8)*2)+(Ref(A1,-9))/55);
M1:=If(CG>Ref(CG,-2),1,0);
M2:=If(C>Mov(C,12,S),1,0);
E1:=Max(((Ref(Mov(C,5,E),-1)*.6666)+C*.3333),Mov(C,5,E));
F1:=Max(((Ref(Mov(C,10,E),-1)*.82)+C*.18),Mov(C,10,E));
G1:=Max(E1-F1,Mov(C,5,E)-Mov(C,10,E));
M3:=If(G1>Ref(G1,-1),1,0);
JCM:=M1+m2+M3;JCM

again plot it on the monthly dow chart





__________ Information from ESET NOD32 Antivirus, version of virus signature database 4944 (20100314) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___