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

[amibroker] Re: Peak & Zig Zag



PureBytes Links

Trading Reference Links

Thanks to all for the dialog on this indicator.

Herman, your sample Guppie code does a good job of illustrating the
nature of the problem.

Thanks and regards.

Phsst


--- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" <psytek@xxxx>
wrote:
> If i remember correctly I found the following code on Guppie's site; it
> validates and colors the Zig to show when Zig is valid (doesn't look
ahead).
> For details goto the Guppie site - perhaps some kind soul can post
the URL -
> I don't have it handy. Actually, if you do a search on the Zig
you'll find a
> European individual who made quite a study of it and has several
detailed
> report posted on his web site - I thin it was the person who
developed the
> Validation routine - there are also numerous discussions around... I'm
> working with limited Internet access and can't be more specific.
> 
> herman
> 
> P1 = 6;
> Z = Zig(C,P1);
> last=ValueWhen(( Z > Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2) ) OR ( Z <
> Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2) ),Ref(Z,-1),1);
> pc=(C-last) * 100 / last;
> pc= abs(pc);
> SD=(z>Ref(z,-1) AND Ref(z,-1)>Ref(z,-2)) OR (z<Ref(z,-1) AND
> Ref(z,-1)<Ref(z,-2));
> res=IIf(pc>=P1 ,1,0);
> Plot(Z,"Z",res+1,1);
> 
> 
> 
>   -----Original Message-----
>   From: Phsst [mailto:phsst@x...]
>   Sent: November 25, 2003 2:57 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: [amibroker] Re: Peak & Zig Zag
> 
> 
>   Excuse me... Enter key on Subject Line gets me too often.
> 
>   It is clear that Zig Zag *can* give unrealistic test results because
>   it looks into the future. This is documented. But there is almost the
>   caveat *can* included in the caution.
> 
>   But are there any known conditions where test results can be
relied upon.
> 
>   For example if a calculated trendline up to the current bar is more
>   than a few bars old, and is linear for those past bars, and correlates
>   (for lack of a better word) with current bar close price,  does this
>   not perhaps mean that an assumption can be safely made that future
>   prices have not yet influenced the current trend?
> 
>   Regards,
> 
>   Phsst
> 
> 
>         Yahoo! Groups Sponsor
>               ADVERTISEMENT
> 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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