How to terminate a single backtesting optimization case immediately?

Hi all,

Lately I've been backtesting my screener and optimizing some parameters. It turns out optimizing multiple parameters can cost lots of time, and I've been trying to reduce the overhead.
Example, say I want to find the best range of profit locking:

profit_upperlimit = Optimize(0, 0, 20, 1);
profit_lowerlimit = Optimize(0, 0, 20, 1); 
cond = profit_upperlimit > profit_lowerlimit AND profit_rate >= profit_lowerlimit AND profit_rate <= profit_upperlimit;

There are cases where the profit_upperlimit > profit_lowerlimit is false, may I ask if the backtester will stop the optimization case immediately or I need to set any flag to exit to save the overhead?

I think the Exclude keyword should do what you want: AmiBroker Knowledge Base » Using Exclude statement to skip unwanted optimization steps

Exactly what I wanted, thanks a lot!

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.