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

[amibroker] Help with Breakout Backtest



PureBytes Links

Trading Reference Links










Have you set the trade delays?

The flip function keeps the buy signal at 1 until you get a
sell signal. This will mean the your condition <font size=3
color=blue>BarsSince(<span
>Buy) != <font size=3
color=fuchsia face="Courier New">0<span
> will always be true ( I think ).



Cheers,
Graham
http://e-wire.net.au/~eb_kavan/ 



<span
>-----Original Message-----
From: Collectable Images
[mailto:telecard@xxxxxxxxxxxxxx] 
Sent: Saturday, July 03, 2004 8:22
AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] code problem

<font size=2
face="Times New Roman"> 



<font size=2 color=blue
face=Arial>My brain
must be confused but I am having triuble with a simple concept.





<font size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>I buy on
a day when C, L, H, are aqll below the previous day.





<font size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>I want
to sell when the close is broken but how do I set the stop to be;





<font size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>a) The
close of the entry day.





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>b) The
close of the day before.





<font size=2
face="Times New Roman"> 





<font size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>When I
set it to be the close of the day before it either takes the entry day as the
close or when I put in a condiytion it misses the next few signals.





<font size=2
face="Times New Roman"> 





<span
>Entry = C
< Ref(C, -<font
size=3 color=fuchsia>1<font
size=3 color=blue>) <span
>AND H
< Ref(H, -<font
size=3 color=fuchsia>1<font
size=3 color=blue>) <span
>AND L
< Ref(L, -<font
size=3 color=fuchsia>1<font
size=3 color=blue>);

<span
>Break_of_Close = Cross(Ref(<span
>C, -<font size=3
color=fuchsia>1<font
size=3 color=blue>), <font
size=3 color=blue face="Courier New">C<font size=3
color=blue>); 

<span
>Buy<font
size=3 color=blue> = Entry;

<span
>Sell<font
size=3 color=blue> = Break_of_Close <span
>AND BarsSince(Buy) != <font size=3 color=fuchsia
face="Courier New">0;

<span
>Buy<font
size=3 color=blue> = Flip( <span
>Buy, Sell
); 

<span
>SellPrice<font
size=3 color=blue> = <span
>C;



<font size=2
face="Times New Roman">

Check AmiBroker web page at:<font
face="Courier New">
http://www.amibroker.com/

Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html










Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.