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

RE: [amibroker] Re: One trade a day and time frame - problem



PureBytes Links

Trading Reference Links










Test it without the optimize statement, that shows the
default test at 35

 



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



<span
>-----Original Message-----
From: Collectable Images
[mailto:telecard@xxxxxxxxxxxxxx] 
Sent: Saturday, July 03, 2004 3:07
PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Bugs?

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

<span
>Hello,

I am a newbie to this program so appreicate any help to understand what is
going on with the program.

I havean issue that I can not understand.

1) A chart shown below has the 37 day EMA (blue line) and the code in
amibroker should exit at break of this line with the close. Why did it not
stop out??



<font size=2
face="Times New Roman">Here is the code.





<span
>PosQty = 15;
//posqty =
Optimize("PosQty", 15, 1, 25, 1 );

<span
>SetOption(<font
color=fuchsia>"MaxOpenPositions",
posqty);

<span
>PositionSize = -<font
color=fuchsia>100/posqty; 

<span
>Average_Price = <span
>Ref(MA(<span
>C, <span
>14), -<span
>1);

<span
>Average_volume = <span
>Ref(MA(<span
>V, <span
>14), -<span
>1);

<span
>Liquidity = Average_Price * Average_volume;

<span
>test = Optimize(<font
color=fuchsia>"test", <font
color=fuchsia>3<font
color=fuchsia face="Courier New">5, 1,
50, <font
color=fuchsia>1); 

<span
> 

<span
>Buy = <font
color=blue>Cross(<span
>H, Ref(HHV
(H, <span
>10), -<span
>1)) AND
H > <span
>EMA(C,
40) <span
>AND <span
>HHVBars(H,
70)==<font
color=fuchsia>0 <span
>AND Liquidity > <span
>500000 AND
C < <span
>10 AND
C > O; //Entry
Conditions

<span
>Sell = <font
color=blue>Cross(<span
>EMA(L,
test), C); <span
>//exit rules

<span
>SetTradeDelays(<font
color=fuchsia>0, <span
>0, <span
>0, <span
>0);





<span
><img border=0 width=357
height=353 src="jpg00080.jpg"
alt="The image &#8220;file:///C:/Main%20Directory/StockMarket/Image%20File%20Charts/chart.JPG&#8221; cannot be displayed, because it contains errors.">



<span
>
 

<span
> 

<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.








Attachment: Description: ""