Paul,
I am trying to set the rules as defined by this site:
http://www.gummy-stuff.org/zweig.htm
"*
You compare this Friday's closing price with recent weekly closes.
* If there
was a recent low, and this Friday's close is 4% higher
than that low, then
you assume you're at a market low and you Buy.
* If there was a recent high,
and this Friday's close is 4% lower
than that high, then you assume you're at
a market high and you Sell."
The Flip recommendation posted earlier
seemed to solve the weekly
buying problem and I am now trying to see if the
trades match up with
the right close and HHV/LLV values in excel. I might not
have the
threshold calculated correctly so I appreciate the
help.
Thanks
DM
--- In amibroker@xxxxxxxxxps.com,
"Paul Ho" <paultsho@xx.> wrote:
>
> This statement doesnt
look right
> buy if the Close drops 4% below the HHV of the last 52 weeks
and buy
if the
> Close is greater than the LLV of the last 52 weeks
based on Fridays
close.
> 1. Is the first buy a sell?
> 2. Does
the second buy have a 4% limit somewhere, or do you just
want to buy
>
anytime when its greater than its 52weeks low which is just about
all
the
> time.
>
>
> _____
>
> From: amibroker@xxxxxxxxxps.com
[mailto:amibroker@xxxxxxxxxps.com]
On
Behalf
> Of Dave McLeod
> Sent: Friday, 2 March 2007 4:10 AM
>
To: amibroker@xxxxxxxxxps.com
>
Subject: [amibroker] Zweig 4% Rule/System
>
>
>
>
> I am trying to code the Zweig 4% reversal system but I am
not
catching on as
> to how to limit the buys and sells from each
week.
>
> Your supposed to buy if the Close drops 4% below the HHV
of the last 52
> weeks and buy if the Close is greater than the LLV of the
last 52 weeks
> based on Fridays close.
>
> Here is what I
have so far.
>
> DOW=DayOfWeek()==5;
>
Hi=HHV(Close,52);
> Lo=LLV(Close,52);
> VBuy =
Close*1.04>=Ref(Lo,-1) AND DOW;
> VSell =
Close*.96<=Ref(Hi,-1) AND DOW;
> Buy =
ExRem(VBuy,VSell);
> Sell = ExRem(VSell,VBuy);
>
>
This buys and then sells each week. I am obviously not using
exrem
correctly
> and it still buys weekly wether I have DOW in or
out.
>
> If someone could point out my mistakes that would be
great.
>
> Thanks
> DM
>
>
> _____
>
> We won't tell. Get more on shows
>
<http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265>
you
>
hate to love
> (and love to hate): Yahoo!
>
<http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265>
TV's
>
Guilty Pleasures list.
>