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

[EquisMetaStock Group] Re: Question re: ZigZag Trend



PureBytes Links

Trading Reference Links

------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.

To reply:  http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=5400
------------------------------------------------------------------------

Spyros - thanks so much for your prompt reply - I'll have fun playing 
with this now. Much appreciated - David
--- In equismetastock@xxxx, "SR" <raftsp@xxxx> wrote:
> David,
> 
> For back tests you should always use SR ZigZag Trend or any fixed 
amount SR
> ZZT.
> Never use Zigzag Validity for back tests! And certainly, never use
> zigzag-related
> MS functions for back tests, unless you confirm them with SR ZZT!
> 
> Since you want to use 3% troughbars of close ( TroughBars(1,c,3) ) 
you have
> to use
> a 3% (fixed amount) SR ZZT. Let's call it SR ZZT1. If you already 
have some
> fixed
> amount SR ZZTs use one of them and make sure that the "amnt" 
constant reads
> 3.
> It should look like this:
> 
> {SR ZZT1}
> amnt:=3; {so SR ZZT1 uses 3%}
> md:=1;
> vr:=CLOSE;
> zz0:=If(md=1, Zig(vr,amnt,%), Zig(vr,amnt,$));
> zz1:=Ref(zz0,-1);
> zz2:=Ref(zz0,-2);
> 
> tr:=ValueWhen(1,zz0>zz1 AND zz1<zz2, zz1);
> pk:=ValueWhen(1,zz0<zz1 AND zz1>zz2, zz1);
> PU:=If(md=1,tr+Abs(tr)*amnt/100,tr+amnt);
> PD:=If(md=1,pk-Abs(pk)*amnt/100,pk-amnt);
> 
> res:=If(vr>=PU AND zz0>zz1,1,
> If(vr<=PD AND zz0<zz1,-1,0));
> res:=If(res<>0,res,ValueWhen(1,res<>0,res));
> res
> {*** End of Code ***}
> 
> Now one step further:
> I guess that
> the troughbars are valid if the SR ZZT1 reads 1 (uptrend confirmed) 
and
> the peakbars are valid if the SR ZZT1 reads -1 (downtrend 
confirmed).
> 
> So, now we are ready to make valid troughbars and peakbars 
indicators in the
> following way:
> 
> {SR Troughbars1}
> TrB:=If(Fml("SR ZZT1")=1,TroughBars(1,C,3),PREV+1);
> TrB
> 
> {SR Peakbars1}
> PkB:=If(Fml("SR ZZT1")=-1,PeakBars(1,C,3),PREV+1);
> PkB
> 
> Needless to say that one can make various fixed amount SR ZZTs and 
SR
> Peakbars
> and Troughbars indicators (with various reversal amounts) by 
changing the
> corresponding
> constants.
> 
> Finaly, your expert signal should look like this:
> 
> Fml("SR Troughbars1")*2=Fml("SR Peakbars1")
> AND Fml("SR Peakbars1")>Fml("SR Troughbars1")
> 
> You will certainly notice that the new signals are delayed -
compared to the
> old ones-
> but this is the cost of peaks and troughs confirmation.
> You may want to experiment with different reversal amounts. 
Obviously,
> smaller amounts
> result in more signals and shorter delays.
> 
> I hope this helps
> 
> Best regards
> Spyros
> 
> 
> 
> Message: 4
>    Date: Mon, 04 Nov 2002 18:37:15 -0000
>    From: "drc13uk" <drc1939@xxxx>
> Subject: Re: Question re: ZigZag Trend
> 
> Spyros - I would like to substitute your Binary ZigZag validity in
> place of the ordinary ZigZag in the following exploration :
> When(TroughBars(1,C,3)*2,=,PeakBars(1,C,3))
> AND When(PeakBars(1,C,3),>,TroughBars(1,C,3))
> Can you lead me in the right direction to achieve this? Many thanks,
> David.


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/