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

[amibroker] shorcut to optimize



PureBytes Links

Trading Reference Links

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 ;



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