Hello Ken,
check this
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1 );
Width = Param("Width%", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
CenterLine = MA( P, Periods );
Plot( (1 + Width * 0.01) * CenterLine, "%EnvTop" + _PARAM_VALUES(), Color,
Style );
Plot( (1 - Width * 0.01) * CenterLine, "%EnvBot" + _PARAM_VALUES(), Color,
Style );
CenterLine2 = MA(CenterLine,100);
Plot( (1 + Width * 0.01) * CenterLine2, "%EnvTop" + _PARAM_VALUES(), 6, 32 );
Plot( (1 - Width * 0.01) * CenterLine2, "%EnvBot" + _PARAM_VALUES(), 6, 32 );
Thank you
bye the way.. how do you intrepret your previous code ?? (MA Cross Over -
Ribbon )
--- On Thu, 9/9/10, Ken H <[email protected]> wrote:
From: Ken H <[email protected]>
Subject: Re: [amibroker] Re: Help with Code for MA Cross Over - Ribbon Indictor
To: [email protected]
Date: Thursday, 9 September, 2010, 7:30 AM
Thanks guys for the help to resolve my problem with the ribbon indicator
code. It is greatly appreciated.
If I can just ask for help one more time please.
I am sure it is very simple to do but as much as I play around, I can't get the
percent band code below to lock to a MA instead of the close.
Can anyone suggest what I need to do?
Many thanks again
Ken
_SECTION_BEGIN("Percent Bands");
P = ParamField("MA1(Close,100",-1);
Periods = Param("Periods", 15, 2, 300, 1 );
Width = Param("Width%", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
CenterLine = MA( P, Periods );
Plot( (1 + Width * 0.01) * CenterLine, "%EnvTop" + _PARAM_VALUES(), Color,
Style );
Plot( (1 - Width * 0.01) * CenterLine, "%EnvBot" + _PARAM_VALUES(), Color,
Style );
_SECTION_END();