PureBytes Links
Trading Reference Links
|
Thomas:
The T3 code is plotting but is it optimizing the
period? I don't think so. Take a look, for example, at the
"optimized" period when the market is changed - always get the default
period. See Feedback suggestion #675 - can't use ParamOptimize()
for charting (don't know if this will ever change). As for T3 vs Hull
- probably something goofy in the Hull function.
Bill
----- Original Message -----
Sent: Saturday, March 10, 2007 11:57
AM
Subject: [amibroker] Error message with ParamOptimize
- why?
>I
had actually asked this question a couple of weeiks ago but hadn't got an
> answer. Maybe this time someone has an idea - TJ??? > >
I'm using the ParamOptimize function in the following form: > >
[quote] > function popt( Titlename, default, minv, maxv, step ) >
{ > return Optimize( Titlename, > Param( Titlename, default, minv,
maxv, step ), > minv, maxv, step ); > } > [/quote] >
> I included it, e.g., in the T3 formula: > >
[quote] > #include <Paramoptimize.afl> > > function
T3(price,periods) > { > s = popt("s",0.8,0.2,2,0.1); >
e1=EMA(price,periods); > e2=EMA(e1,Periods); >
e3=EMA(e2,Periods); > e4=EMA(e3,Periods); >
e5=EMA(e4,Periods); > e6=EMA(e5,Periods); > c1=-s*s*s; >
c2=3*s*s+3*s*s*s; > c3=-6*s*s-3*s-3*s*s*s; >
c4=1+3*s+s*s*s+3*s*s; > Ti3=c1*e6+c2*e5+c3*e4+c4*e3; > return
ti3; > } > > P = ParamField("Price field",-1); >
Periods = popt("Periods", 15, 2, 200, 1 ); >
Plot(t3(p,periods),_DEFAULT_NAME(), ParamColor( "Color", colorCycle ), >
ParamStyle("Style") ); > [/quote] > > ... and it plots
perfectly okay. > > However, if I include it in the Hull MA formula
like this: > > [quote] > #include
<ParamOptimize.afl> > > P = ParamField("Price
field",-1); > > HullMA = HullMaFunction( P, Periods, Delay );
> Periods = popt("Periods", 15, 2, 200, 1 ); > Delay =
popt("Delay", 0, 0, 10, 1 ); > X = 2 * WMA(P,round(Periods/2)) -
WMA(P,Periods); > HullMA = WMA(X,round(sqrt(Periods))); > HullMA =
Ref(HullMA,-Delay);Plot( HullMA, _DEFAULT_NAME(), > ParamColor( "Color",
colorCycle ),ParamStyle("Style") ); > > space = Param("Graph
Space", 10, 0, 25, 1); > GraphXSpace = space; > [/quote] >
> ... and I try to plot this indicator I get the following error: >
> [quote] > Price: > return Optimize(Titlename, >
Param(Titlename, default, minv, maxv, step), > minv, maxv, step); >
} > ^ > > Error 32. > Syntax error, probably missing
semicolon at the end of the previous line > [/quote] > >
> I'm probably blind but I'm not able to see why the same function works
in one > formula but doesn't work in the other. By the way: If I click
the "Verify > syntax" button in the editor for the Hull MA fomula I don't
get any error > message. > > Any idea what's going on
here? > > Regards, > Thomas > > >
------------------------ 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/ > > > > > -- > 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 >
>
__._,_.___
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
SPONSORED LINKS
__,_._,___
|