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

SR ZigZag Trend (NEW INDICATOR)



PureBytes Links

Trading Reference Links

Ok, this is going to be a lengthy message, but I guess it is going to be an
interesting one, so, please read carefully. It is better not to include the
whole message in your replies. Before you hit the send button, please delete
this message from your answer, or we will all end up with very long
messages!

I had promised a version of ZigZag validity suitable for back tests.

The bad news:
Yesterday I saw that, though such an indicator is possible, its development
is a very tricky job. This is because the cases of missed signals (invisible
false zigzags of the past) do not fall into one single category but rather
into many different ones (for example cases of missed zigzags during
confirmed trends, cases of fluctuations of prices during doubtful trends
etc.). Now, I think that dealing with all these cases is almost as hard or
even harder than developing a new zigzag indicator from scratch.

The good news:
I think there is a much simpler solution to the problem. Instead of trying
to discover and validate each invisible zigzag, one can deal only with the
confirmed trends. After all, this is what we all want and it is much easier,
too!
Following this idea, I wrote a new binary indicator, which returns 1 for
confirmed up trends and -1 for confirmed downtrends and which is also based
on the Zigzag indicator. The idea is that the user of Zigzag does not wish
to deal with doubtful periods at all. He does not want to be mislead by
false Zig signals, but neither should he get into the trap of detecting past
invisible formations, just to reject them!

My new indicator takes advantage of Zig's ability to mark major troughs and
peaks but at the same time it avoids any premature - and thus dangerous -
evaluations about the evolving trend. In fact, it is like having an
always-valid binary Zigzag!
If what I suggest here is correct - and I do say IF - then we have a kind of
zig which is not only useful for visual inspections but can also be used in
system tests and can be even optimized like any other indicator used in
systems. I have to be precautionary because until now, almost every attempt
for a completely satisfactory confrontation of problems related to the
Zigzag indicator, at least those I am aware of, have failed. Of course this
includes my own! (Well, ZigZag validity works fine but only as far as the
LAST dynamic leg is concerned). This one seems to work equally well not only
with current prices but also with historical ones. So, all we can do for now
is wish it a better luck.

The new indicator will be called "SR ZigZag Trend".
I have tested its behavior in more than 50 cases, which include disappearing
and re-appearing of zigzags in down and up trends, in weak and strong,
gradual and abrupt moves. In all these cases it worked correctly, but it is
very early for enthusiasm because dealing with Zigzag seems like alchemy.
You never know if what you see is true. I will only be sure when my
indicator passes all the necessary tests. And there have to be hundreds of
them to convince me!
Therefore, I suggest you should consider yourselves kind of  "beta testers".
Before starting to use my indicator in systems, please take the time to test
it yourselves. For testing both the ZigZag and my indicator I would suggest
the following method:

1. Use the Zigzag indicator and the SR ZigZag Trend with the same percent of
close (say 10%).
2. Add a second more sensitive Zigzag indicator (say 3 %)
3. During a long trend indicated by the 10% Zig (a long line) find a few
minor zigzags of the 3% Zig and mark them with vertical lines.
4. Keep a note of the dates when these marks appear and of the readings of
both the 10% ZigZag and the SR ZigZag Trend on those dates. You are making a
table with 3 columns: Date, 10%Zig (up or down), SR ZigZag Trend (1 or -1).
5. Close the chart and re-open it using the first date you have noted as the
LAST date of the chart.
6. Observe the behavior of the 10% Zigzag: In some cases it should be
heading towards the opposite direction of what you had previously noted. On
the contrary, the SR ZigZag Trend should NOT reconsider its value. If it is
like I say, then repeat steps #5 and #6 until all the dates you have marked
are examined. If you notice any revisions in the values of SR ZigZag Trend
then you have caught a mistake (bad luck for all of us but especially for
me). Take a detailed note of it, stop testing and contact me.

If everything seems ok with the cases you have examined, this still doesn't
mean that everyone else had the same experience. So, please post your
results and read what the others have to say.

You will notice that the indicator follows Zig's changes of direction with a
delay, which is necessary for the confirmation of the trend. Hopefully, once
a new trend is detected and confirmed, SR ZigZag Trend will not be revised,
until the next (opposite) trend's confirmation. Due to this delay, the
values returned by SR ZigZag Trend do not always coincide with profitable
buy and sell signals, though in many cases they really do! But this is the
old well-known sad story of any trend-following system. What is new here, is
that the fans of ZigZag, MAY have now a kind of Zig, which they can play
with harmlessly. And maybe the results are not so exciting as when playing
ball with Zig, but here one kicks a real ball not a balloon!

A few notes before going to the code. I have no reason to doubt anyone's
good will, intentions and honesty. But I have to repeat what is usually said
about intellectual property. I hope you all understand. So here we go:
Please don't change the indicator's name, its comments or its code, if in
the future you need to post it to someone. My name and e-mail address should
be present in case someone wants to contact me directly. Any changes made to
my formula should be discussed with me before being published (outside this
group). It may not be used for commercial reasons without my written
permission, neither as it is nor as part of other products. Any formulas,
systems, experts, explorations, plug-ins or stand-alone applications, which
use the whole code or important parts of it, or reference it, should mention
my name. I am not responsible for any losses..  ..blah blah, though I will
take your profits if you succeed :)

Needless to say, that I would be glad to hear any of your suggestions,
corrections, or possible improvements.
In any case I would appreciate your feedback.

Good luck

Spyros


Formula Name: SR ZigZag Trend


{SR ZigZag Trend}
{by Spyros Raftopoulos}
{E-mail :  raftsp@xxxxxxxxx}

{This binary indicator is based on the Metastock's Zig Zag function.
1 = confirmed uptrend,   -1 = confirmed downtrend}

perc:=Input("percent",1,100,10);
tr:=ValueWhen(1,Zig(C,perc,%)>Ref(Zig(C,perc,%),-1) AND
Ref(Zig(C,perc,%),-1)<Ref(Zig(C,perc,%),-2),Ref(Zig(C,perc,%),-1));
tr:=If( (C-tr)*100/tr>= perc ,tr,0);
tr:=If( tr=0, ValueWhen(1,tr<>0,tr), tr);
pk:=ValueWhen(1,Zig(C,perc,%)<Ref(Zig(C,perc,%),-1) AND
Ref(Zig(C,perc,%),-1)>Ref(Zig(C,perc,%),-2),Ref(Zig(C,perc,%),-1));
pk:=If((C-pk)*100/pk <=-perc , pk, 0);
pk:=If( pk=0, ValueWhen(1,pk<>0,pk), pk);
res:=If(pk<>Ref(pk,-1), -1,
If(tr<>Ref(tr,-1), 1, 0));
res:=If(res=0,ValueWhen(1,res<>0,res),res);
res




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 19/04/02