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