Thomas:

The code runs OK for me producing a plot of Hull with the default period.

Bill

----- Original Message ----- 
From: "Thomas Ludwig" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, March 11, 2007 9:48 AM
Subject: Re: [amibroker] Error message with ParamOptimize - why?


>> You have this line included before you define periods and delay variables
>> HullMA = HullMaFunction( P, Periods, Delay );
>> But because you re-define the HullMa variable later in the code anyway you
>> can remove this line altogether
> 
> Graham, thanks a lot. You are right, of course, and I was blind. Now it 
> works. 
> But - I'm still having problems with this function. If I apply it to the 
> following formula:
> 
> #include <ParamOptimize.afl>
> 
> P = ParamField("Price field",-1);
> 
> Periods = popt("Periods", 15, 2, 200, 1 );
> 
> Hull=DEMA( 2*DEMA(p,int(periods/2))- DEMA(p,periods),int(sqrt(periods)));
> 
> Plot( Hull, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), 
> ParamStyle("Style") );
> 
> 
> space = Param("Graph Space", 10, 0, 25, 1);
> GraphXSpace = space;
> 
> 
> ... I get the error message mentioned - even if I replace popt with Param! 
> The 
> #include line alone is enough to cause that error. Isn't that strange?
> 
> Greetings, Thomas
> 
> 
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.7/711 - Release Date: 3/5/2007 9:41 
> AM
> 
>

Reply via email to