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

Re: [amibroker] My backtest is bypassing trades. Any idea why?



PureBytes Links

Trading Reference Links

Hello,

CROSS( array1, array2 ) function gives "true" result exactly at bar when array1 crossed above array2
it gives "false" in all other points.

Your system is using "AND" clause between Cross functions so
it means that ALL of them MUST cross AT THE SAME BAR.

This is *VERY, VERY, VERY* unlikely 
that all 3 averages (with different periods) will cross the close price at the same bar.

Short = Cross (Slow, Close) AND Cross (Fast, Close) AND Cross  (Slower, Close); 

So I guess you are after something like this instead:
Short = Slow > Close AND Fast > Close AND Slower > Close; 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "bobnat.rm" <bobnat@xxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, December 29, 2003 6:34 PM
Subject: [amibroker] My backtest is bypassing trades. Any idea why?


> Hi all,
> 
> I'm very new to AB and I'm slowly working out the backtesting 
> system.  I've been running very simple tests such as the one below 
> in order to get a grasp on things.
> 
> 
> Fast = EMA( Close, 10 ); 
> Slow = EMA( Close, 20 ); 
> Slower = EMA( Close, 40 ); 
> 
> Short = Cross (Slow, Close) AND Cross (Fast, Close) AND Cross 
> (Slower, Close); 
> Cover = Cross (Close, Slower);
> 
> 
> I run this (and a similar one for buys) and when I have the Actual 
> Trade Arrows appear on say the GBP/USD Forex chart, I see that 
> trades have been missed.  It'll go short at the appropriate close, 
> then exit at the first appropriate close.  But then, it'll bypass 
> trades that qualify for a new short entry.  Even the Raw Arrows do 
> the same thing.
> 
> Am I missing something fundamental here, such as some sort of reset 
> for the entry parameter?  
> 
> Any input will be greatly appreciated.
> 
> Thanks,
> 
> Bob
> 
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> 
> Yahoo! Groups Links
> 
> To visit your group on the web, go to:
>  http://groups.yahoo.com/group/amibroker/
> 
> 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/ 
> 
> 
> 

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Yahoo! Groups Links

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

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/