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

RE: [amibroker] shorcut to optimize



PureBytes Links

Trading Reference Links

Stephane:

I use the Boolean comparison in cases like this:

CompMFI=(nb==1)*Comp1+(nb==2)*Comp1+(nb==3)*Comp1....etc.

A little neater and easier but still laborious.

Ken

-----Original Message-----
From: Stephane Carrasset [mailto:nenapacwanfr@xxxxxxxxx] 
Sent: Saturday, November 08, 2003 5:51 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] shorcut to optimize

Hello,

If I do a backtest with an optimization on multiples composites
is there a shorcut to this code below if I have 100 composites to 
avoid iiiiiiiiiiiiiiiiiiiiiiif 100 times.

stephane

 /**Optimize Trend**/
Comp1=Foreign("~MFI10", "X") ;
Comp2=Foreign("~MFI15", "X") ;
Comp3=Foreign("~MFI20", "X") ;
Comp4=Foreign("~MFI25", "X") ;

nb=Optimize("Comp",1,1,4,1);
CompMFI=IIf(nb==1,Comp1,IIf(nb==2,Comp2,IIf(nb==3,Comp3,Comp4)));
Trend= CompMFI >0 ;




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 

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ 




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/