See also this:
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:zigzag

Take closer look at this sentence "The ZigZag has zero predictive power and draws lines base on hindsight." (hindsight in technical analysis is equivalent to "looking into the future").

On 2010-04-26 11:22, Tomasz Janeczko wrote:


Hello,

You still don't understand anything about zigzag algorithm.
If you did you will know that to generate zig you must look into future bars.

I am saying that Wealth Lab use *THE SAME* algorithm as ANY other software,
there is no magic and no secret in it.
First it calculates REGULAR zig zag (identical as in Metastock, AmiBroker and thousands
of other softwares) then it applies DELAY.
To implement regular zigzag Wealth Lab LOOKS into the future.
But later the "looking into the future" is removed by DELAYING response
as many bars as it looks into the future.

The same delay can be applied to any zig-based function and
the implementation of such delayed peak/trough/zig is shown in this article:
http://www.amibroker.com/members/traders/11-2003.html

Use this formula and you will see:
|array = *Close*;
amount = Param("Amount", 15.5, 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 ); PlotShapes( *Buy* + 2 * *Sell*, ribboncol, 0, IIf( *Buy*, *L*, *H* ), -30 );|

(Blue line represents undelayed zig/zag, while RED LINE shows DELAYED signal and the RED LINE indicator DOES NOT LOOK into the future, even though it is based on zig).

This shows precisely how it is done to "have no look into the future" effect - take the indicator that looks into the future and DELAY it as many bars as it looks into the future (note that delay amount CHANGES from leg to leg because it waits until new leg reaches
threshold level).

This also shows how to use zig/peak/trough in a trading system.

Best regards,
Tomasz Janeczko
amibroker.com

PS. Removing my earlier response and repeating your post four times does not add any strength to your argument.

On 2010-04-26 04:51, jhnlmn wrote:
Clearly you did not read the manual
Why not?
I do understand the algo of peak/trough in WL.
It simply searches for min/max before a reversal.
Obviously, if the reversal did not happen yet, then the peak/trough
is not registered and the previous peak/trough is reported.
This lag is natural and perfectly makes sense to me.
And it works well when drawing trendlines, since trendlines
should take into account historical data (have some lag).
I read advices on the Web not to take the most recent data when
drawing trendlines.
And, of course, never look into the future,
which means that the result should be the same,
no matter whether the current bar is the last in the dataset
or not.

You are saying that AB zigzag can be used only for pattern
recognition and not for trading, but what is the purpose of
developing a pattern recognition script, which could not be used
for real trading or verified using backtesting?

This is my understanding.

However, I am new to technical analysis,
so, please, correct me if I am wrong.

Thank you
John



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

**** 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







Reply via email to