[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Auto-optimization AFL uploaded



PureBytes Links

Trading Reference Links




<SPAN 
class=363204015-28102003>thanks for the compliments, glad it's kind of sane in 
there (:-). 
<SPAN 
class=363204015-28102003> 
<SPAN 
class=363204015-28102003>just FYI, there's a new version of this that I haven't 
posted yet. among other changes, it handles up to 3 optimization parameters, and 
allows each rule to set the optimization parameter ranges independently. it also 
moves the docs into a separate file, so the code file is smaller and easier to 
deal with. I'll get that up as soon as I can finish it off.
<SPAN 
class=363204015-28102003> 
<SPAN 
class=363204015-28102003>no, you don't have to set dynamic yourself, and 
shouldn't. did you read the comments about 
it? I bet it's not dynamic itself that your rule is getting hung up on, 
it's the optimization parameters being arrays when dynamic is true. 

<SPAN 
class=363204015-28102003> 
<SPAN 
class=363204015-28102003>here's the section about this from the newer version, 
expanded a bit from the original; not sure if the example BuySell rules it 
mentions are exactly the same:
<SPAN 
class=363204015-28102003> 
<SPAN 
class=363204015-28102003>--------------
<SPAN 
class=363204015-28102003>during optimization, the active rule is called multiple 
times, once with each combination of p1, p2 and p3 being tested. at this time, 
p1, p2 and p3 are simple <FONT face="Courier New" color=#0000ff 
size=2>numeric values, not arrays. once optimal 
settings have been determined for every bar, the rule is called once more, to 
generate actual trading signals. this time, <FONT 
face="Courier New" color=#0000ff size=2>p1, p2 
and p3 are arrays, each bar dynamically containing the optimal p1, p2 and p3 
value for that bar.
 
<SPAN 
class=363204015-28102003>whether they're simple values or arrays matters because 
not all AB functions can accept arrays as inputs. for example, MA, TEMA, DEMA, 
WMA and AMA can use an <FONT face="Courier New" color=#0000ff 
size=2>array as their period, but EMA and MACD 
can't. it's usually possible to code an equivalent in AFL that can, like the 
included EMAx function is a replacement for <FONT 
face="Courier New" color=#0000ff size=2>EMA. an 
AFL replacement may be significantly slower though, if it has to do a lot of 
work, since rules are called many times during optimization. you could also 
<SPAN 
class=363204015-28102003>use a DLL, like indicators.dll from the 3rd party 
section of the AB site, but I didn't want this code to depend on outside 
tools.
 
<SPAN 
class=363204015-28102003>if this is an issue for a particular rule, include both 
slower array-capable code for use in the final signal-generation phase, and 
faster, non-array-capable code <FONT face="Courier New" 
color=#0000ff size=2>for use during the many 
optimization tries. use the 'dynamic' parameter to know which to call; see 
BuySellStoch, below, for an example. you can also write a <FONT 
face="Courier New" color=#0000ff size=2>custom 
function with both versions, and pass dynamic into it; see BuySellCCI and CCIx 
for an example.
<SPAN 
class=363204015-28102003><SPAN 
class=363204015-28102003>--------------
<SPAN 
class=363204015-28102003> 
<SPAN 
class=363204015-28102003>hth,
<SPAN 
class=363204015-28102003> 
<SPAN 
class=363204015-28102003>dave
<BLOCKQUOTE 
>
  Hi Dave,
   
  I started working with it...very nice, 
  structured, work...this will help folks learn AFL as well as general 
  programming design, I believe..
   
  so far, i am having a bit of trouble with the 
  'dynamic' True/False parameter being fed to one of my indicators---but i 
  suspect this is my problem not yours:
   
  BuySellRule(True, best_p1, 
  best_p2);-----------------------------------^
   
  Bad args.0-th argument of function call has invalid (or 
  unsupported) type
   
  I don't have to specifically set 'dynamic'; do 
  I?
   
  thanks
   
  -john
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    Dave Merrill 
    
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">amibroker@xxxxxxxxxxxxxxx 
    Sent: Thursday, October 23, 2003 6:32 
    PM
    Subject: RE: [amibroker] 
    Auto-optimization AFL uploaded
    
    <SPAN 
    class=638102902-24102003>thanks, appreciate it (:-).
    <SPAN 
    class=638102902-24102003> 
    <SPAN 
    class=638102902-24102003>so, did you figure out how we can all be 
    millionaires by morning with it yet? or at least learn something about 
    something?
    <SPAN 
    class=638102902-24102003> 
    <SPAN 
    class=638102902-24102003>you probably noticed this, but the way it comes set 
    up, it's not using equity feedback to optimize with, but net bars on the 
    right side of the market. my initial impression after I built that was that 
    it worked better than equity, but since then, I've concluded that, guess 
    what, it depends. so anyway, try the other scoring algorithm too, if you 
    haven't already.
    <SPAN 
    class=638102902-24102003> 
    <SPAN 
    class=638102902-24102003>keep me posted (:-).
    <SPAN 
    class=638102902-24102003> 
    <SPAN 
    class=638102902-24102003>anyone else playing with this 
    thing?
    <SPAN 
    class=638102902-24102003> 
    <SPAN 
    class=638102902-24102003>dave
    <BLOCKQUOTE 
    >
      <FONT face=Arial 
      color=navy size=2><SPAN 
      >I’ve downloaded 
      it and run it about a dozen times.  What you’ve done is very 
      impressive.
      
      <SPAN 
      > 
      <SPAN 
      >Thanks,
      <SPAN 
      >Howard
      <SPAN 
      > 
      <DIV 
      >
      <SPAN 
      >-----Original 
      Message-----From: Dave 
      Merrill [mailto:dmerrill@xxxxxxx] <SPAN 
      >Sent: Wednesday, October 22, 2003 
      1:11 PMTo: 
      amibroker@xxxxxxxxxxxxxxx<SPAN 
      >Subject: RE: [amibroker] 
      Auto-optimization AFL uploaded
      <SPAN 
      > 
      
      <SPAN 
      >forgot to 
      say it howard, but I'm very interested in what you think about it, and any 
      results you get from fiddling with it.
      
      <SPAN 
      > 
      
      <SPAN 
      >dave






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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.