PureBytes Links
Trading Reference Links
|
How about something like this? I haven't tested it, just typed it in here.
Steve
-------------------------------------------------
MovAvgPds = 13;
LookbackPds = 63;
WantInChan = 85 // want 85% of Closes to be inside channel
MovAvg = MA( Close, MovAvgPds );
UpperBand = LowerBand = MovAvg;
KeepLooping = True;
// adjust Incr as desired
For( Incr = 0.25; Incr < 10 AND KeepLooping; Incr = Incr + 0.25 )
{
UpperBand = UpperBand + Incr;
LowerBand = LowerBand - Incr;
InChan = Close < UpperBand AND Close > LowerBand
TotalInChan = Sum (InChan, LookbackPds );
PctInChan = TotalInChan / LookbackPds * 100;
If( PctInChan >= WantInChan )
KeepLooping = False;
}
Plot( Close, "Close", colorBlack, styleCandle );
Plot( UpperBand, "Upper Band", colorBlue, styleLine );
Plot( LowerBand, "Lower Band", colorBlue, styleLine );
----- Original Message -----
From: "niceguyeddy5" <niceguyeddy5@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, May 29, 2005 5:44 PM
Subject: [amibroker] Moving Average Channels?
> Hello.....
>
> Is there an indicator out there that can automatically adjust the
> width of moving average channels to fit a givnen amount of data?
>
> That is.....the moving average channels are great....but it's kind of
> a pain to use trial and error to re adjust them to contain, say, 85%
> of the data for each new chart I load...
>
> Thanks...
>
> Ed S.
>
>
>
>
>
>
> 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 other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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 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/
<*> 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/
|