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

[amibroker] Re: ZigZag code



PureBytes Links

Trading Reference Links

Hi 
I am interested in this function also, but on inspection found a few things that I believe are errors. When I applied it to a test data set it missed a few valid highs and lows.
Looking at the code I saw that when testing for a swing High it (correctly) tests whether this is > End_Val_HL*WavePcnt.
However when testing for a swing Low it simply replaces the > sign with a < sign, whereas the test should be < End_Val_HL/WavePcnt.
There are also a few peculiar issues, like using Ref(H,0) where simply H would do, and setting a for loop between i=0 and i<Barcount, and then later testing whether i>0 and i<Barcount, where the condition could not occur anyway if i = 0. However, these don't affect the answer.
I am working on another version (hopefully correct!) and will post this when complete.

Brian



--- In amibroker@xxxxxxxxxxxxxxx, Thomas Ludwig <Thomas.Ludwig@xxx> wrote:
>
> Thanks for sharing this code. It's seems not quite identical with the built-in 
> function, though.
> 
> Regards
> 
> Thomas
> 
> On 19.06.2009, 20:37:04 Herman wrote:
> > I think this was posted by Dave, a long time ago:
> >
> >  function ZigZagHL(prcnt)
> > {
> 
> [snip]
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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