Hi Howard, Thanks for your afl,t is really smart idea....
Regards Kusnadi --- Pada Kam, 5/8/10, Howard B <[email protected]> menulis: Dari: Howard B <[email protected]> Judul: Re: [amibroker] The Speed of Optmization Kepada: [email protected] Tanggal: Kamis, 5 Agustus, 2010, 10:13 PM 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]> 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
