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

[amibroker] Re: Peak & Zig Zag



PureBytes Links

Trading Reference Links

I'm actually not looking for the signal, I'm looking to confirm the 
trend.  Tomasz seems to be using 6% as the parameter, but I seriously 
doubt it...

rgds, Pal
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Greg,
> the challenge is the signal will always be late. If you set your 
pivots at,
> say, 5% then zz trend will not trigger until 5% after the turn 
actually
> happened. The picture that Tomasz just posted illustrates this
> perfectly......
> 
> Regards,
> Jayson
> -----Original Message-----
> From: Greg [mailto:gregbean@x...]
> Sent: Monday, November 24, 2003 3:19 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Re: Peak & Zig Zag
> 
> 
> Hi,
> 
> I was wondering if anyone has read the Nov. 2003 TASC  article 
about ZigZag
> trend indicator.
> 
> The author claims it to be a tradeable indicator because it solves
> theproblem of the dynamic last leg.
> 
>  I was thinking this might be adapted with a validating signal such 
as TRIX
> and or StoRSI but I haven't tested any further .  Anybody have any 
thoughts
> about the TASC article and/or the indicator?
> 
> Greg
> 
> Here is the code that TJ programmed:
> 
> /*THE ZIGZAG TREND INDICATOR
> 
> In "The Zigzag Trend Indicator" article Spyros Raftopoulos presents 
an
> enhancement of his zigzag validity indicator. A new Zigzag Trend 
indicator
> is an attempt to address shortcomings (mainly 'last leg' problem) 
of classic
> zigzag. The technique involves delaying the response of the 
indicator as
> long as reversal amount is reached AND last leg of zigzag line 
becomes valid
> AND can be easily reproduced in AmiBroker using its native AFL 
language.
> Listing 1 shows ready-to-use code that can be applied in Indicator 
Builder.
> It includes also a very basic reversal trading system to be applied 
in
> Automatic Analysis window. The percentage reversal amount can be 
changed
> on-the-fly without modifying the code using the Parameters window.
> 
> LISTING 1*/
> 
> array = Close;
> 
> amount = Param("Amount", 6, 1, 50, 0.5 );
> 
> zz0 = Zig( array, amount );
> 
> zz1 = Ref( zz0, -1 );
> 
> zz2 = Ref( zz0, -2 );
> 
> tr = ValueWhen(zz0 > zz1 AND zz1 < zz2, zz1);
> 
> pk = ValueWhen(zz0 < zz1 AND zz1 > zz2, zz1);
> 
> PU = tr + 0.01 * abs(tr)*amount;
> 
> PD = pk - 0.01 * abs(pk)*amount;
> 
> ZZT = IIf( array >= PU AND zz0 > zz1, 1,
> 
> IIf( array <= PD AND zz0 < zz1, -1, 0 ) );
> 
> ZZT = ValueWhen( ZZT != 0, ZZT );
> 
> // plot price bar chart
> 
> Plot( Close, "Price", colorBlack, styleBar );
> 
> // plot Zigzag and zigzag trend
> 
> Plot( ZZT, "ZigZagTrend", colorRed, styleOwnScale );
> 
> Plot( zz0, "ZigZag line", colorBlue, styleThick );
> 
> // Plot the ribbon
> 
> ribboncol= IIf( ZZT > 0, colorGreen, colorRed );
> 
> Plot( 2, "ZZT Ribbon", ribboncol, styleArea | styleOwnScale | 
styleNoLabel,
> 0, 100 );
> 
> GraphXSpace = 10;
> 
> Buy = Cover = Cross( ZZT, 0 );
> 
> Sell = Short = Cross( 0, ZZT );
> 
> // plot arrows
> 
> PlotShapes( Buy + 2 * Sell, ribboncol, 0, IIf( Buy, L, H ), -30 );
> 
> 
>   ----- Original Message -----
>   From: Jayson
>   To: amibroker@xxxxxxxxxxxxxxx
>   Sent: Monday, November 24, 2003 3:29 PM
>   Subject: RE: [amibroker] Re: Peak & Zig Zag
> 
> 
>   The Challenge Phsst is that the legs can changed based on future 
data in
> which case your buy or sell signal can simply vanish in the back 
test. Zig
> can be very useful in real time but like every thing else in Real 
time you
> simply can not know for sure until time has past if your signal was 
in fact
> valid or not. A back test using zig (or peak or trough) will always 
show you
> the best signals only and none of the failed signals.
> 
>   Regards,
>   Jayson
>   -----Original Message-----
>   From: Phsst [mailto:phsst@x...]
>   Sent: Monday, November 24, 2003 1:57 PM
>   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
> 
> 
> 
>   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.
> 
>   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
>             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/