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:* [email protected]
>     [mailto:[EMAIL PROTECTED] *On Behalf Of *Keith McCombs
>     *Sent:* Wednesday, March 14, 2007 9:44 PM
>     *To:* [email protected]
>     *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:* [email protected]
>>         [mailto:[EMAIL PROTECTED] *On Behalf Of *Keith McCombs
>>         *Sent:* Wednesday, March 14, 2007 12:12 PM
>>         *To:* [email protected]
>>         *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:* [email protected]
>>>             [mailto:[EMAIL PROTECTED] *On Behalf Of
>>>             *dralexchambers
>>>             *Sent:* Wednesday, 14 March 2007 3:15 AM
>>>             *To:* [email protected]
>>>             *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
>>>
>  

Reply via email to