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
you hate to love(and love to hate):
Yahoo!
TV's Guilty Pleasures list.