PureBytes Links
Trading Reference Links
|
On Mon, 18 Oct 2004 13:56, see_change007 wrote:
> Tomaz
>
> Is it possible to optimize using non linear steps ?
>
> I have several variables which I want to do a "mega optimization"
> for. For each varaible I have several levels which I'm interested in
> testing in relation with the others, but there isn't a consistent
> linear step between the values for each variable.
>
> Can you set up the optimization to do this ?
>
> Also thought people might want to optimize on other non linear series
> like fibs.
>
> See Change
The Optimize() function only does linear steps. If you need non-linear,
convert optimize's linear output to whatever non-linear function you need.
Eg.
function fib(n) {
// return the n'th Fibonacci number.
// This function is good on amibroker up to n==32, when rounding errors
// start to accumulate and the correct answers have more than 6 digits.
// (AB only has about 6 digits precision.)
// the constants in the return statement are
// 3.2360679 == 1 + sqrt(5);
// -1.2360679 == 1 - sqrt(5);
// 2.2360679 == sqrt(5);
n = int(n);
return int((3.2360679^n - -1.2360679^n) / (2^n * 2.2360679));
}
fibn = fib(Optimize("Fibonacci", 1, 1, 10, 1));
Will set fibn to 1,1,2,3,5,8,13,21,34,55 for each optimise step.
Then do whatever you want with the first 10 fibonacci numbers.
Cheers,
Nigel
--
Nigel Rowe
rho@xxxxxxxxxxxxxxx
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|