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

Re: [EquisMetaStock Group] New file uploaded to equismetastock



PureBytes Links

Trading Reference Links

Colin

Once you have created the indicators from my last post you could then create
the following. Once these are installed you should be able to install the
kit to get the explorations, but be aware that you will probably overwrite
the manually entered indicators as well. The standard TE indicators have not
been updated to V4.2 yet but there are small differences between the
following and those in the kit.

I usually provide support for all Trade Equity code at
http://groups.yahoo.com/group/TradeEquity/ where there is also a user guide
with the same code as in the kits.

Roy


  {Trade Equity LC}
  {V4.1a long compound, © 2002 Roy Larsen}
No:=Input("Enter 1=O 2=C 3=H 4=L 5=Stop",1,5,2);
Xo:=Input("Exit 1=O 2=C 3=H 4=L 5=Stop" ,1,5,2);
Nd:=Input("Entry delay #",0,3,0);
Xd:=Input("Exit delay #" ,0,3,0);
Cn:=Input("Entry commission $",0,99,30);
Cx:=Input("Exit commission $" ,0,99,30);
Cp:=6000;  {* Initial trade capital *}
N:= Fml("Trade Equity Binary Entry");
Ns:=0;
X:= Fml("Trade Equity Binary Exit");
Xs:=0;
  {* use 'Xs' with caution when Xo<>5 *}
  {* end of user area *}
Ns:=If(No=5,Ns,0);
Np:=If(Ns>0,Ns,If(No=1,O,If(No=3,H,If(No=4,L,C))));
N:=N AND Alert(N=0,2); X:=If(Xo<5,X AND Alert(X=0,2),0);
N:=If(Nd=0,N,Alert(N,Nd+1) AND Alert(N,Nd)=0);
N:=If(No=5 AND Ns>0,1,If(No<5,N,0));
Xp:=If(Xs>0,Min(H,Max(L,Xs)),If(Xo=1,O,If(Xo=3,H,If(Xo=4,L,C))));
X:=If(Xd=0,X,Alert(X,Xd+1) AND Alert(X,Xd)=0); X:=If(Xs>0,1,X);
Xp:=If(Xo<5 AND No=5 AND X=0,C,Xp);
Xp:=If(Xs>0 AND N AND X,Xs,Xp);
Xp:=If(Ref(N AND X,-1),Ref(Xp,-1),Xp);
I:=Cum((N+X)>-1)=1;N:=If(I>-1,N,0);
Tr:=BarsSince(I OR N)<(BarsSince(I OR X)+(Cum(N)=1 AND Cum(I+X)=1));
Tr:=If(N+X>1 AND (Alert(Tr,2) OR (Nd+Xd<1 AND
No<>2 AND Xo>1 AND (Max(No,Xo)>4 OR No<>Xo))),1, Tr);
En:=(Tr AND Alert(Tr=0,2)) OR I;
Ex:=Tr=0 AND Alert(Tr,2); Np:=If(I AND N=0,C,Np);
Lb:=(Alert(Tr,2)) AND LastValue(Cum(1)-0)=Cum(1);
Ea:=ValueWhen(1,En,If(No=5 AND N AND X,Np,Max(O,Np)));
Ea:=If(No<5,ValueWhen(1,En,Np),Ea);
En:=Tr AND Alert(Tr=0,2);
N:=Cum(If(I,Cp,0)-If(En,Cn,0)-If(Ex,Cx,0));
Ns:=Cum(If(Alert(Tr,2) AND If(No=5,1,En=0),
(PREV+If(No=5 AND En,N,Ref(N,-1)))*
If((No=5 AND En) OR (No<5 AND En=0 AND Alert(En,2)),
(Xp-Ea)/Ea,(Xp-Ref(Xp,-1))/Ref(Xp,-1)),0));
X:=(N+Ns+If(Ex,Cx,0))*Ea/Xp;
Xs:=If((Ex OR Lb) AND (N+Ns)>X+Cx,N+Ns-X-Cn,0);
Xd:=If((Ex OR Lb) AND (N+Ns)<=X+Cx,N+Ns-X-Cn,0);
Nd:=If(Alert(Tr,2),N+Ns-Cn-ValueWhen(1,I OR En,(N+Ns)),0); N+Ns;

  {Trade Equity LE}
  {V4.0a long equal, © 2002 Roy Larsen}
No:=Input("Enter 1=O 2=C 3=H 4=L 5=Stop",1,5,2);
Xo:=Input("Exit 1=O 2=C 3=H 4=L 5=Stop" ,1,5,2);
Nd:=Input("Entry Delay #",0,3,0);
Xd:=Input("Exit Delay #" ,0,3,0);
Cn:=Input("Entry Commission $",0,99,30);
Cx:=Input("Exit Commission $" ,0,99,30);
Cp:=6000; {* trade capital, 0 = points only *}
Pp:=1;    {* position size fml *}
N:= Fml("Trade Equity Binary Entry");
Ns:=0;
X:= Fml("Trade Equity Binary Exit");
Xs:=0;
  {* use 'Xs' with caution when Xo<>5 *}
  {* end of user area *}
Pp:=If(Pp=0,1,Pp); Ns:=If(No=5,Ns,0);
Np:=If(Ns>0,Ns,If(No=1,O,If(No=3,H,If(No=4,L,C))));
N:=N AND Alert(N=0,2); X:=If(Xo<5,X AND Alert(X=0,2),0);
Pp:=ValueWhen(1,(N+Ns)>0 OR Cum((N+Ns)>-1),Pp);
N:=If(Nd=0,N,Alert(N,Nd+1) AND Alert(N,Nd)=0);
N:=If(No=5 AND Ns>0,1,If(No<5,N,0));
Xp:=If(Xs>0,Min(H,Max(L,Xs)),If(Xo=1,O,If(Xo=3,H,If(Xo=4,L,C))));
X:=If(Xd=0,X,Alert(X,Xd+1) AND Alert(X,Xd)=0); X:=If(Xs>0,1,X);
Xp:=If(Xo<5 AND No=5 AND X=0,C,Xp);
Xp:=If(Xs>0 AND N AND X,Xs,Xp);
Xp:=If(Ref(N AND X,-1),Ref(Xp,-1),Xp);
I:=Cum((N+X)>-1)=1;N:=If(I>-1,N,0);
Tr:=BarsSince(I OR N)<(BarsSince(I OR X)+(Cum(N)=1 AND Cum(I+X)=1));
Tr:=If(N+X>1 AND (Alert(Tr,2) OR (Nd+Xd<1 AND
No<>2 AND Xo>1 AND (Max(No,Xo)>4 OR No<>Xo))),1, Tr);
En:=(Tr AND Alert(Tr=0,2)) OR I;
Ex:=Tr=0 AND Alert(Tr,2); Np:=If(I AND N=0,C,Np);
Lb:=(Alert(Tr,2)) AND LastValue(Cum(1)-0)=Cum(1);
Ea:=ValueWhen(1,En,If(No=5 AND N AND X,Np,Max(O,Np)));
Ea:=If(No<5,ValueWhen(1,En,Np),Ea);
Pp:=ValueWhen(1,En,If(Pp<1,Cp*Pp,If(Pp>1, (Ea*Pp)+Cn,Cp)));
En:=Tr AND Alert(Tr=0,2);
N:=If(Ex OR Lb,If(Cp=0,Xp-Ea-Cn-Cx,(Pp-Cn)* (Xp/Ea)-Pp-If(Ex,Cx,0)),0);
No:=If(Alert(Tr,2),1+BarsSince(En OR I),0);
Xs:=If(Alert(Tr,2),If(Cp=0,Xp-Ea,(Pp-Cn)* (Xp/Ea)-Pp-If(Ex,Cx,0)),0);
Nd:=LowestSince(1,I,Xs); Ns:=HighestSince(1,I,Xs);
X:=Cum(If((Ex OR Lb) AND N> 0,No,0));
Xd:=Cum(If((Ex OR Lb) AND N<=0,No,0));
Cum(N)+Cp+If(Tr AND Lb=0,If(Cp=0,Xp-Ea-Cn,(Pp-Cn)*(Xp/Ea)-Pp),0);

  {Trade Equity SC}
  {V4.0 short compound, © 2002 Roy Larsen}
No:=Input("Enter 1=O 2=C 3=H 4=L 5=Stop",1,5,2);
Xo:=Input("Exit 1=O 2=C 3=H 4=L 5=Stop" ,1,5,2);
Nd:=Input("Entry delay #",0,3,0);
Xd:=Input("Exit delay #" ,0,3,0);
Cn:=Input("Entry commission $",0,99,30);
Cx:=Input("Exit commission $" ,0,99,30);
Cp:=10000;  {* Initial trade capital *}
N:= Fml("Trade Equity Binary Exit");
Ns:=0;
X:= Fml("Trade Equity Binary Entry");
Xs:=0;
  {* use 'Xs' with caution when Xo<>5 *}
  {* end of user area *}
Ns:=If(No=5,Ns,0);
Np:=If(Ns>0,Ns,If(No=1,O,If(No=3,H,If(No=4,L,C))));
N:=N AND Alert(N=0,2); X:=If(Xo<5,X AND Alert(X=0,2),0);
N:=If(Nd=0,N,Alert(N,Nd+1) AND Alert(N,Nd)=0);
N:=If(No=5 AND Ns>0,1,If(No<5,N,0));
Xp:=If(Xs>0,Min(H,Max(L,Xs)),If(Xo=1,O,If(Xo=3,H,If(Xo=4,L,C))));
X:=If(Xd=0,X,Alert(X,Xd+1) AND Alert(X,Xd)=0); X:=If(Xs>0,1,X);
Xp:=If(Xo<5 AND No=5 AND X=0,C,Xp);
Xp:=If(Xs>0 AND N AND X,Xs,Xp);
Xp:=If(Ref(N AND X,-1),Ref(Xp,-1),Xp);
I:=Cum((N+X)>-1)=1;N:=If(I>-1,N,0);
Tr:=BarsSince(I OR N)<(BarsSince(I OR X)+(Cum(N)=1 AND Cum(I+X)=1));
Tr:=If(N+X>1 AND (Alert(Tr,2) OR (Nd+Xd<1 AND
No<>2 AND Xo>1 AND (Max(No,Xo)>4 OR No<>Xo))),1, Tr);
En:=(Tr AND Alert(Tr=0,2)) OR I;
Ex:=Tr=0 AND Alert(Tr,2); Np:=If(I AND N=0,C,Np);
Lb:=(Alert(Tr,2)) AND LastValue(Cum(1)-0)=Cum(1);
Ea:=ValueWhen(1,En,If(No=5 AND N AND X,Np,Min(O,Np)));
Ea:=If(No<5,ValueWhen(1,En,Np),Ea);
En:=Tr AND Alert(Tr=0,2);
N:=Cum(If(I,Cp,0)-If(En,Cn,0)-If(Ex,Cx,0));
Ns:=Cum(If(Alert(Tr,2) AND If(No=5,1,En=0),
(ValueWhen(1,En OR I,PREV)+If(No=5 AND En,N,Ref(N,-1)))*
If((No=5 AND En) OR (No<5 AND Alert(En,2) AND En=0),
(Ea-Xp)/Ea,(Ref(Xp,-1)-Xp)/Ea),0));
X:=If(Alert(Tr,2),2*Ea-Xp,Ea); X:=Ea*(N+Ns+If(Ex,Cx,0))/X;
Xs:=If((Ex OR Lb) AND (N+Ns)>X+Cx,N+Ns-X-Cn,0);
Xd:=If((Ex OR Lb) AND (N+Ns)<=X+Cx,N+Ns-X-Cn,0);
Nd:=If(Alert(Tr,2),N+Ns-Cn-ValueWhen(1,I OR En,(N+Ns)),0);
N+Ns;

  {Trade Equity SE}
  {V4.0a short equal, © 2002 Roy Larsen}
No:=Input("Enter 1=O 2=C 3=H 4=L 5=Stop",1,5,2);
Xo:=Input("Exit 1=O 2=C 3=H 4=L 5=Stop" ,1,5,2);
Nd:=Input("Entry Delay #",0,3,0);
Xd:=Input("Exit Delay #" ,0,3,0);
Cn:=Input("Entry Commission $",0,99,30);
Cx:=Input("Exit Commission $" ,0,99,30);
Cp:=10000; {* trade capital, 0 = points only *}
Pp:=1;    {* position size fml *}
N:= Fml("Trade Equity Binary Exit");
Ns:=0;
X:= Fml("Trade Equity Binary Entry");
Xs:=0;
  {* use 'Xs' with caution when Xo<>5 *}
  {* end of user area *}
Pp:=If(Pp=0,1,Pp); Ns:=If(No=5,Ns,0);
Np:=If(Ns>0,Ns,If(No=1,O,If(No=3,H,If(No=4,L,C))));
N:=N AND Alert(N=0,2); X:=If(Xo<5,X AND Alert(X=0,2),0);
Pp:=ValueWhen(1,(N+Ns)>0 OR Cum((N+Ns)>-1),Pp);
N:=If(Nd=0,N,Alert(N,Nd+1) AND Alert(N,Nd)=0);
N:=If(No=5 AND Ns>0,1,If(No<5,N,0));
Xp:=If(Xs>0,Min(H,Max(L,Xs)), If(Xo=1,O,If(Xo=3,H,If(Xo=4,L,C))));
X:=If(Xd=0,X,Alert(X,Xd+1) AND Alert(X,Xd)=0); X:=If(Xs>0,1,X);
Xp:=If(Xo<5 AND No=5 AND X=0,C,Xp);
Xp:=If(Xs>0 AND N AND X,Xs,Xp);
Xp:=If(Ref(N AND X,-1),Ref(Xp,-1),Xp);
I:=Cum((N+X)>-1)=1;N:=If(I>-1,N,0);
Tr:=BarsSince(I OR N)<(BarsSince(I OR X)+(Cum(N)=1 AND Cum(I+X)=1));
Tr:=If(N+X>1 AND (Alert(Tr,2) OR (Nd+Xd<1 AND
No<>2 AND Xo>1 AND (Max(No,Xo)>4 OR No<>Xo))),1, Tr);
En:=(Tr AND Alert(Tr=0,2)) OR I;
Ex:=Tr=0 AND Alert(Tr,2); Np:=If(I AND N=0,C,Np);
Lb:=(Alert(Tr,2)) AND LastValue(Cum(1)-0)=Cum(1);
Ea:=ValueWhen(1,En,If(No=5 AND N AND X,Np,Min(O,Np)));
Ea:=If(No<5,ValueWhen(1,En,Np),Ea);
Pp:=ValueWhen(1,En,If(Pp<1,Cp*Pp,If(Pp>1, (Ea*Pp)+Cn,Cp)));
En:=Tr AND Alert(Tr=0,2);
N:=If(Ex OR Lb,If(Cp=0,Ea-Xp-Cn-Cx,(Pp-Cn)* ((Ea-Xp)/Ea)-Cn-If(Ex,Cx,0)),0);
No:=If(Alert(Tr,2),1+BarsSince(En OR I),0);
Xs:=If(Alert(Tr,2),If(Cp=0,Ea-Xp,(Pp-Cn)* ((Ea-Xp)/Ea)-Cn-If(Ex,Cx,0)),0);
Nd:=LowestSince(1,I,Xs); Ns:=HighestSince(1,I,Xs);
X:=Cum(If((Ex OR Lb) AND N> 0,No,0));
Xd:=Cum(If((Ex OR Lb) AND N<=0,No,0));
Cum(N)+Cp+If(Tr AND Lb=0,If(Cp=0,Ea-Xp-Cn, (Pp-Cn)*((Ea-Xp)/Ea)-Cn),0);

----- Original Message ----- 
From: "duras79" <no_reply@xxxxxxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Thursday, May 08, 2003 9:11 PM
Subject: Re: [EquisMetaStock Group] New file uploaded to equismetastock


> Roy
>
> Thanks for your reply.
>
> I am using "MS65".  The error occurs in Column one:
>
> {Net profit}
> Eq:=Fml("Trade Equity LC");
> Cp:=FmlVar("Trade Equity LC","Cp"); Eq-Cp;
>
> and I can only cancel out of the updating process.
>
> Colin
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
> wrote:
> > Colin
> >
> > Did you try to install "Trade Equity Advanced Kit MS65" or "Trade
> Equity
> > Advanced Kit MS70" ?
> >
> > When you look in your indicator list do you see any 'Trade Equity'
> > indicators, and what about explorations?
> >
> > The MS70 kit versions will create a number of errors if loading is
> attempted
> > to 6.52. I'm pretty rusty when it come to 6.52 but I seem to recall
> that the
> > installation of any indicator that called another indicator
> (contained Fml()
> > or FmlVar() ) resulted in errors, but in fact once the indicator
> had been
> > opened in the indicator builder and closed again all would work
> perfectly.
> >
> > If you are installing the correct kit it might be useful if you
> manually
> > install (cut and paste) the following two that may be the cause of
> the
> > problem. Make sure the name is exactly the same as the text INSIDE
> the
> > braces {}. One way to achieve this easily is to copy the indicator,
> starting
> > with the whole name line, (Ctrl/C) and paste (Ctrl/V) into both the
> name box
> > then the formula box. Then edit out the braces and any leading
> spaces.
> >
> >   {Trade Equity Binary Entry}
> > F1:=ValueWhen(1,H<Ref(H,-2) AND
> > Ref(H,-1)<Ref(H,-2) AND
> > Ref(H,-3)<Ref(H,-2) AND
> > Ref(H,-4)<Ref(H,-2),Ref(H,-2));
> > Cross(H,F1);
> >
> >   {Trade Equity Binary Exit}
> > F2:=ValueWhen(1,L>Ref(L,-2) AND
> > Ref(L,-1)>Ref(L,-2) AND
> > Ref(L,-3)>Ref(L,-2) AND
> > Ref(L,-4)>Ref(L,-2),Ref(L,-2));
> > Cross(F2,L);
> >
> > Hope this helps.
> >
> > Roy
> >
> > > I'm very new to everything here, so have patience.  I have
> Metastock
> > > 6.52 for windows and when I tried to load Trade Equity Advanced
> Kit
> > > through organiser, the Formula Organiser comes back with an
> > > error "The variable does not exist in the specified formula".
> > > Please help.
> > > Colin
>
>
>
>
> To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/uetFAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/