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

Re: [amibroker] How to Optimise for specific values



PureBytes Links

Trading Reference Links

Alex --

step = Optimize("MAstep", 1, 1, 5, 1){
if(step==1){
  MAval = 20;
}else if(step==2){
  MAval = 25;
}else if(step==3){
  MAval = 50;
}else if(step==4){
  MAval = 100;
}else if(step==5){
  MAval = 200;
}else "ERROR"; // Sorry, someone else will have to explain how to handle the error

// Unfortunately, backtester will display values of MAstep and not MAval
// above is good  example of where Switch/Case would be useful.
// What would be even better would be a new function like:
// MAval = OptimizeList("MAval", 20, 25, 50, 100, 200);
// Maybe there is a way to do it, but I don't know how!

-- Keith

dralexchambers wrote:

How do I do this:

Optimise the MA for the specific values:

20,25,50,70,200

Optimise(MAval,"MA value",20,20,200,5) >>> this loops in Step 5 and I
only want the specific values above tested

Thanks in advance - ALex

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___