Hello,
You should use
firstvar = Optimize("Firstvar",1,1,20,1);
Secondvar = Optimize("Secondvar",1,1,20,1);
Buy = Sell = True;
Exclude = Firstvar > SecondVar; // this specifies what combinations to exclude
from result list
Best regards,
Tomasz Janeczko
amibroker.com
On 2010-08-05 08:17, Kusnady wrote:
> Dear friends,
>
> is there anyone having some experiences with parameter of optimization?
>
> Look at the afl below:
>
> /////////////////////////////////////////////////////////////
> firstvar = Optimize("Firstvar",1,1,20,1);
> Secondvar = Optimize("Secondvar",1,1,firstvar,1);
>
> Buy = Sell = True;
> /////////////////////////////////////////////////////////////
>
> I need the Secondvar is always less than firstvar, so above I put firstvar as
> the maximum of SecondVar optimize definition.
>
> But once optimized, the SecondVar can be bigger than firstvar....
>
> This slowdown the optimization process.....do you think so?
>
> Could you help me how to code efficiently, so the engine just take the
> firstvar as the maximum for secondvar instead of 20.
>
>
> Regards
> Kusnadi
>
>
>
>
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
>