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

RE: [amibroker] How to Optimise for specific values



PureBytes Links

Trading Reference Links

You're welcome.  The strExtract is a neat way to have a predefines string
array. Paul was clever in his use of it in an optimize situation.

d

> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx 
> [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Duke Jones, CMT
> Sent: Thursday, March 15, 2007 1:46 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] How to Optimise for specific values
> 
> Dingo & Paul,
> 
> I will add my thanks for taking the time to walk us through that 
> example. It was very helpful.
> 
> Regards,
> 
> Duke Jones, CMT
> 
> dingo wrote:
> >
> > Optimize(n, "MA value", 0, 0, 4, 1);
> > MAval = StrToNum(StrExtract("20,25,50,70,200", n));
> > .
> > .
> > .
> >  
> >  
> > The first time thru n will be 0 and the strExtract will 
> then extract 
> > the "0th" entry in the array "20,25,50,70,200" which is "20".
> >  
> > The strToNum will convert the string "20" to the integer 20 
> and assign 
> > it to MAval for use in the rest of the formula.
> >  
> > The second time thru n will be 1, strExtract will extract the "1th" 
> > entry in the array "20,25,50,70,200" which is "25".
> >  
> > The strToNum will convert the string "25" to the integer 25 
> and assign 
> > it to MAval for use in the rest of the formula.
> >  
> > and so on.
> >  
> > d
> >
> >     
> --------------------------------------------------------------
> ----------
> >     *From:* amibroker@xxxxxxxxxxxxxxx
> >     [mailto:amibroker@xxxxxxxxxxxxxxx] *On Behalf Of *Keith McCombs
> >     *Sent:* Wednesday, March 14, 2007 9:44 PM
> >     *To:* amibroker@xxxxxxxxxxxxxxx
> >     *Subject:* Re: [amibroker] How to Optimise for specific values
> >
> >     Dingo and/or Paul --
> >     Sorry, but could you please dumb it down so even I can see how
> >     this works with Optimize()?  A code snippet including Optimize()
> >     and StrToNum(StrExtract("20,25,50,70,200", n))
> >     ought to do it.
> >
> >     Thanks.
> >     -- Keith
> >
> >     dingo wrote:
> >>     the key is the strExtract function. The strToNum 
> merely converts
> >>     the alfa result to a number.
> >>      
> >>     d
> >>
> >>         
> --------------------------------------------------------------
> ----------
> >>         *From:* amibroker@xxxxxxxxxxxxxxx
> >>         [mailto:amibroker@xxxxxxxxxxxxxxx] *On Behalf Of 
> *Keith McCombs
> >>         *Sent:* Wednesday, March 14, 2007 12:12 PM
> >>         *To:* amibroker@xxxxxxxxxxxxxxx
> >>         *Subject:* Re: [amibroker] How to Optimise for 
> specific values
> >>
> >>         Paul --
> >>         Could you please give more detail as to how StrToNum()
> >>         function is applicable to the original Optimize() question?
> >>         -- Keith
> >>
> >>         Paul Ho wrote:
> >>>         StrToNum(StrExtract("20,25,50,70,200", n))
> >>>
> >>>             
> --------------------------------------------------------------
> ----------
> >>>             *From:* amibroker@xxxxxxxxxxxxxxx
> >>>             [mailto:amibroker@xxxxxxxxxxxxxxx] *On Behalf Of
> >>>             *dralexchambers
> >>>             *Sent:* Wednesday, 14 March 2007 3:15 AM
> >>>             *To:* amibroker@xxxxxxxxxxxxxxx
> >>>             *Subject:* [amibroker] How to Optimise for 
> specific values
> >>>
> >>>             How do I do this:
> >>>
> >>>             Optimise the MA for the specific values:
> >>>
> >>>             20,25,50,70,200
> >>>
> >>>             Optimise(MAval,"MA value",20,20,200,5) >>> 
> this loops in
> >>>             Step 5 and I
> >>>             only want the specific values above tested
> >>>
> >>>             Thanks in advance - ALex
> >>>
> >  
> 
> 
> ------------------------ Yahoo! Groups Sponsor 
> --------------------~--> 
> Transfer from your equities account.  
> Receive up to $1,000 from GFT. Click here to learn more.
> http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/GHeqlB/TM
> --------------------------------------------------------------
> ------~-> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
>  
> Yahoo! Groups Links
> 
> 
> 
> 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Transfer from your equities account.  
Receive up to $1,000 from GFT. Click here to learn more.
http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/