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 <[EMAIL PROTECTED]>
*To:* [email protected]
*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.