Howard --
There are two problems with your solution:
1.  You still get 400 optimizations instead of desired 210.
2.  Secondvar is not conveniently numbered.

-- Keith

On 8/5/2010 11:13, Howard B wrote:

Hi Kusnadi --

For an alternative method to insure that the second variable is always greater than the first, change this code:
///////////////////////////////

firstvar = Optimize("Firstvar",1,1,20,1);
Secondvar = Optimize("Secondvar",1,1,firstvar,1);

Buy = Sell = True;
/////////////////////////////////////////////////////////////

to this code:
///////////////////////////////
firstvar = Optimize("Firstvar",1,1,20,1);
VarIncrement = Optimize("VarIncrement",1,1,20,1);

Secondvar = firstvar + VarIncrement;

Buy = Sell = True;
/////////////////////////////////////////////////////////////

Thanks,
Howard




On Thu, Aug 5, 2010 at 12:17 AM, Kusnady <[email protected] <mailto:[email protected]>> 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



Reply via email to