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

Re: [amibroker] Rookie question - Back Test for a particular time frame



PureBytes Links

Trading Reference Links

Buy = DateNum() == 1020101;
Sell = DateNum ==1060101;

But markets are closed on Jan 1 so you won't have any data for that day and 
will probably need to chnage it to 1020102 or whatever is the next day with 
data. See DateNum function for details.

Steve

----- Original Message ----- 
From: "ted_j_webb" <ted_j_webb@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, September 28, 2008 12:17 AM
Subject: [amibroker] Rookie question - Back Test for a particular time frame


> Hi folks, I'm a AmiBroker rookie, so please be patient and
> understanding!  What I want to do is backtesting with a single issue
> and simply buy all shares on a particular date and sell all shares on a
> particular date.  Then look at the gain/loss.
>
> I have had success with buying and selling with 'close'
> crossing 'MA', 'MA' crossing 'MA', Etc.  But I simply can not get
> the 'date' thing worked out.
>
> What would be the code for the following action:
>
> Buy all shares on 1 Jan 2002
>
> Sell all shares on 1 Jan 2006
>
> Thanks!
>
>
> ------------------------------------
>
> **** 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/