PureBytes Links
Trading Reference Links
|
the word "name" can give you errors within the function definition as name
is used ofr function already Name()
Change this to something else
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com
On 02/02/07, Tomasz Janeczko <groups@xxxxxxxxxxxxx> wrote:
>
> James,
>
> Put the code I given ON THE TOP of your formula:
> function ParamOptimize( name, default, minv, maxv, step )
> {
> return Optimize( name, Param( name, default, minv, maxv, step ), minv,
> maxv, step );
> }
>
> Then just call it as you would do with built-in functions:
>
>
> EntryBars = ParamOptimize("Entry Bars", 15, 1, 100, 1);
>
> Full code:
>
> /////////////// START/////////////////
>
> function ParamOptimize( name, default, minv, maxv, step )
> {
> return Optimize( name, Param( name, default, minv, maxv, step ), minv,
> maxv, step );
> }
>
> EntryBars = ParamOptimize("Entry Bars", 15, 1, 100, 1);
> Buy = ... your rules here...
> Sell = ....your rules here
>
> ///////////// END /////////////////////
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
>
> ----- Original Message -----
> *From:* James <jamesmemphis@xxxxxxxxx>
> *To:* amibroker@xxxxxxxxxxxxxxx
> *Sent:* Thursday, February 01, 2007 8:20 PM
> *Subject:* [amibroker] ParamOptimize - syntax help
>
> Could someone help me with the syntax for ParamOptimize? It is not really
> in the function guide, just a comment by TJ under optimize. Here is
> the stated syntax:
>
> function ParamOptimize( name, default, minv, maxv, step )
> {
> return Optimize( name,
> Param( name, default, minv, maxv, step ),
> minv, maxv, step );
> }
> Here are the 2 statements I am trying to combine:
>
>
> //EntryBars = Param("Entry Bars", 15, 1, 100, 1);
>
> //EntryBars = Optimize("Entry Bars", 15, 1, 100, 1);
>
>
>
> And here is where I stand right now:
>
>
> *
>
> function
> * ParamOptimize( EntryBars, 15, 1, 100, 1)
>
> {
> *return* Optimize (EntryBars, Param EntryBars, 15, 1, 100, 1),1, 100, 1
> );};
>
>
>
> which is not working. I have tried variations but obviously
>
> I am not a programmer.
>
>
>
> Thank you,
>
> James
>
> ------------------------------
> Now that's room service! Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel<http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw-->to find your fit.
>
>
>
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.19/663 - Release Date: 2/1/2007 2:28 PM
|