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

Re: [amibroker] optimization



PureBytes Links

Trading Reference Links


Hello,
 
There is a bug in optimize feature that has an 
effect that at the optimization
setup stage d1 becomes an {empty} value for a 
while and MA crashes with {empty} period, 
so one need the following <FONT 
face=Tahoma>work-around for using MA in optimization 
formula:
 
d1 = optimize( "%D days",10, 2, 30, 1 
);
 
d1 = LastValue( IIF( IsEmpty( d1 ), 1, d1 ) ); 

 
buy = close >ma (close, d1) ;sell =close 
<ma (close, d1) ;
 
Best regards,Tomasz Janeczko===============AmiBroker - the 
comprehensive share manager.<A 
href="">http://www.amibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
David 
Holzgrefe 
To: <A title=amibroker@xxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Thursday, August 23, 20011:25 
AM
Subject: [amibroker] 
optimization

Heres my little test for mov entry exit is would 
seem that i have something wrong with the code as ami crashes when i run it 

 
/* optimization  */
 
d1 = optimize( "%D days",10, 2, 30, 3 
);
 
buy = close >ma (close, d1) ;sell =close <ma (close, d1) 
;
 
Where have i stuffed up ?
 
Thanks DAvidYour 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.