PureBytes Links
Trading Reference Links
|
Dennis --
Yes, I could. Just tried it and it works for all panes and AA BackTest
as well. (for Optimize(), please see comment after code).
I had to make some other changes as well as follows:
My top pane is always just price and volume with maybe one or more
moving averages. This used to be after all the calculations for my
system and before other panes. So now, I moved it up before any of my
calculations. It looks like this:
function ParamOptimize( pname, defaultval, minv, maxv, step )
{
return
Optimize(
pname,
Param( pname,
defaultval, minv, maxv, step ),
minv, maxv, step );
}
GraphXSpace=10;
// plot price and volume
chartID = 1557;
// your mileage may vary
if(GetChartID() == chartID){
StaticVarSet("UpBars", ParamOptimize("UpBars", 3, 1, 6, 1));
UpBars = StaticVarGet("UpBars");
_SECTION_BEGIN("Price");
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo
%g, Close %g, ROC(%.1f%%), Vol %g, \nUpBars %g {{VALUES}}",
O, H, L, C, SelectedValue(ROC(C, 1)), V, UpBars));
Plot(C, "Close", ParamColor("Color", colorBlack ), styleThick | styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Volume");
Plot( Volume, "", colorBlueGrey, ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram), 3);
_SECTION_END();
}
I would like to Optimize() function in AA, using different values of
UpBars. I'm sure I hope to come up with a fix (while sharing values
with respective Param() function), now that I'm on the right track.
I'll post later if/when I find one I like.
Thanks.
-- Keith
Dennis Brown wrote:
Could you set the params once in its own window/chart, then just
set
static variables with the param values? In each of the other charts
reference the static variables instead of the params.
BR,
Dennis
On May 24, 2009, at 3:47 PM, Keith McCombs wrote:
> Is there any convenient way to reset or synchronize parameters in
> multiple chart panes and AA simultaneously?
>
> I commonly have one chart window containing three panes all
defined by
> one .afl program. The program may contain one or more Param()
> statements. It is rather tedious, and prone to mistakes on my
part,
> to
> set each parameter in three separate panes as well as in AA when I
> want
> them to all match.
>
> The best way I have come up with, so far, is to set the default
> value in
> the .afl code and then go to Parameters in each pane and AA,
> separately,
> and select Reset All.
>
> Any suggestions?
> -- Keith
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|
|