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

RE: [amibroker] Zweig 4% Rule/System



PureBytes Links

Trading Reference Links

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@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dave McLeod
Sent: Friday, 2 March 2007 4:10 AM
To: amibroker@xxxxxxxxxxxxxxx
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 you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___