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

Re: Backtesting



PureBytes Links

Trading Reference Links

--- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> Dear Leo,
> 
> The answers are:
> 
> 1. 
> sell = barssince( buy ) == n;

Isn't it true that the above code identifies the last, not the 
first, instance when the buy condition is met?

Even if you buy at bar 100 and expect to exit at bar 100+n, the 
counter is reset and your exit is postponed when a new buy condition 
is met during the n bars.

sincerely,


> 
> 2. to exit January 12, 2001:
> 
> sell = year() == 2001 AND month() == 1 AND day() == 12
> 
> or 
> 
> sell = datenum() == 1010112;
> 
> The same technique can be applied to short/cover variables.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: Leo Timmermans 
> To: amibroker@xxxx 
> Sent: Monday, November 05, 2001 9:32 PM
> Subject: [amibroker] Backtesting
> 
> 
> Hello,
> 
> I'll be new to AmiBroker when 3.8 comes out (I'm currently using 
-testing- 3.7) and have some
> questions regarding exits.
> 
> 1- how do you exit n-days after the buy ?
> 2- how do you exit on a specific day ?
> 
> Any help kindly appreciated.
> Kind Regards
> Leo
> 
> 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.