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

Re: [amibroker] Can't Crack the Code!!! Help



PureBytes Links

Trading Reference Links

Here is a simple method, to buy 5 days before and sell 5 days after

m = month()!=ref(month(),-1);

buy = ref( m, 5 );
sell = ref( m, -5 );


-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com


On 05/12/06, KBGlenn <kbglenn@xxxxxxxxx> wrote:
>
> I am trying to backtest a system whereby you find the last trading day
> of the month and then buy x days before that and sell y days after it.
> I've tried everything I can think of but I have not been unable to
> figure out how to get around days where the market is not open.  I've
> been focused on the dayofyear, month, day, and dayofweek function, but
> I can't seem to break the code.
>
> Could someone please give me a point on this one?
>
> Thank you.
>
>
>
> 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
>
> Yahoo! Groups Links
>
>
>
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.9/573 - Release Date: 12/5/2006 4:07 PM