PureBytes Links
Trading Reference Links
|
There are some cases where Optimizing your system's formula
with a custom series of numbers has an advantage, for example when you have
a very large number of possibilities to cover but you are only
interested in a small subset of numbers. In such a case having a
way to test a custom set of numbers can be a great time-saver.The
solution is to store your custom series in an array and let the Optimizer
generate an index to retrieve the values.For example, to test your
parameters with Fibonacci numbers you can use the code below. To
generate these numbers in a simple sequential Optimization (I know
there is probably a formula for Fibs but this is just an example)
would take 4236 iterations, doing it as below takes only 8 iterations. This
method also allows Random Optimizations...
The disadvantage of this method is that the Optimization
Parameters in your Result window will be index numbers, after sorting you have
to translate those of interest back to you own values - or you can add some
code to do that for you. <FONT face=Arial color=#8b0000
size=2>FB[0<FONT face=Arial
color=#8b0000 size=2>] = <FONT face=Arial color=#ff00ff
size=2>0.0;FB[<FONT
face=Arial color=#ff00ff size=2>1]
= 23.6<FONT face=Arial
color=#8b0000 size=2>;FB[<FONT face=Arial color=#ff00ff
size=2>2] = <FONT face=Arial
color=#ff00ff size=2>38.2<FONT face=Arial color=#8b0000
size=2>;FB[3<FONT
face=Arial color=#8b0000 size=2>] = <FONT face=Arial color=#ff00ff
size=2>50.0;FB[<FONT
face=Arial color=#ff00ff size=2>4]
= 61.8<FONT face=Arial
color=#8b0000 size=2>;FB[<FONT face=Arial color=#ff00ff
size=2>5] = <FONT face=Arial
color=#ff00ff size=2>100<FONT face=Arial color=#8b0000
size=2>;FB[6<FONT
face=Arial color=#8b0000 size=2>] = <FONT face=Arial color=#ff00ff
size=2>161.8;FB[<FONT
face=Arial color=#ff00ff size=2>7]
= 261.8<FONT face=Arial
color=#8b0000 size=2>;FB[<FONT face=Arial color=#ff00ff
size=2>8] = <FONT face=Arial
color=#ff00ff size=2>423.6<FONT face=Arial color=#8b0000
size=2>;FBindex = <FONT face=Arial color=#0000ff
size=2>Optimize(<FONT
face=Arial color=#cc4466 size=2>"FBindex"<FONT face=Arial color=#8b0000
size=2>,0<FONT face=Arial
color=#8b0000 size=2>,0<FONT
face=Arial color=#8b0000 size=2>,<FONT face=Arial color=#ff00ff
size=2>8,<FONT face=Arial
color=#ff00ff size=2>1);FibNum
= FB[FBindex];
... Your code using FibNum here
...
Yahoo! Groups Sponsor
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|