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

[amibroker] Re: Specifying Days of Month



PureBytes Links

Trading Reference Links

Steve,

Perfect!
T
hanks,

Steve

--- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxx> wrote:
>
> Hi - Here is a quick and dirty one you can try, however I am 
shifting an 
> array backward to get the Buys so I think probably the latest buy 
won't show 
> up until the 1st of the following month rolls around, hopefully 
good enough 
> for a quick backtest though...
> 
> Steve
> 
> FirstDay = Day() < ref( Day(), -1 );
> SecondDay = ref( FirstDay, -1 );
> SixthLastDay = ref( FirstDay, 6 );
> Buy = SixthLastDay;
> Sell = SecondDay;
> 
> 
> ----- Original Message ----- 
> From: "steve_almond" <me@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, January 21, 2009 6:27 PM
> Subject: [amibroker] Specifying Days of Month
> 
> 
> >I would like to try a backtest which says:
> >
> > Buy at the open on the 6th last trading day of the month;
> > Sell at the open on the 2nd trading day of the next month;
> >
> > So, for the current month:
> > Buy on Jan 23, 2009
> > Sell on Feb 03,2009
> >
> > Can anyone help me to translate that into AFL?
> >
> > Steve
> >
> >
> > ------------------------------------
> >
> > **** IMPORTANT ****
> > This group is for the discussion between users only.
> > This is *NOT* technical support channel.
> >
> > *********************
> > TO GET TECHNICAL 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
> >
> >
> >
> >
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/