PureBytes Links
Trading Reference Links
|
----- Original Message -----
From: "sjaak1943" <<A
href=""><FONT
size=2>sjaakhaasnoot@xxxxxxxxx<FONT
size=2>>
To: <<A
href=""><FONT
size=2>amibroker@xxxxxxxxxxxxxxx<FONT
size=2>>
Sent: Saturday, September 20, 2003 11:41
AM
Subject: [amibroker] Re: Simple Moving Average
Bands
> Thank you Dimitris for a nice piece of
work.> I read an article about Sigma Bands, it looks like it, but is not
> simular.
Do you have a "how to do it" reference
for calculating the center line of sigma bands or Hurst's centered moving
average?
<FONT
size=2>> From 1 until 15 october we are on Crete again.> >
Sjaak> > > > > --- In <A
href=""><FONT
size=2>amibroker@xxxxxxxxxxxxxxx,
"Dimitris Tsokakis" > <<A
href=""><FONT
size=2>TSOKAKIS@x...> wrote:>
> We may create a channel around M=MA(C,20), if we consider MUP +20% >
above M and MDOWN -20% below M.> > For the last 100 bars, the
percentage of bars inside the channel > is INS %.> > For many
stocks this +20% is wide enough to give INS=100% and does > not
help.> > Let us risk to decrease this 20% to obtain a NEWINS=95%. We
will > see, for many stocks, values below 10%, which gives more >
> reasonable and useful MA channels.> > When the small green circle
appears, we should expect prices to > move towards the MA again.>
> > > // Adjusted Moving Average Bands> > P=20; >
> LOOKBACK=100;> > PERC=95;> > M=MA(C,P);> >
X=2;> > MUP=M*(1+X/10);MDOWN=M*(1-X/10);> >
INS0=100*Sum(C>=MDOWN AND C<=MUP,LOOKBACK)/LOOKBACK;> >
STEP=0.01;> > for(X=0.1;X<3;X=X+STEP)> > {> >
MUP=M*(1+X/10);MDOWN=M*(1-X/10);> > INS=100*Sum(C>=MDOWN AND
C<=MUP,LOOKBACK)/LOOKBACK;> > G[0]=2;> >
if(INS[BarCount-1]<=PERC)> > {G=X;}}> >
NEWMUP=M*(1+G/10);NEWMDOWN=M*(1-G/10);> >
NEWINS=100*Sum(C>=NEWMDOWN AND C<=NEWMUP,LOOKBACK)/LOOKBACK;> >
Plot(C,"",1,64);F=Cum(1)>LastValue(Cum(1))-LOOKBACK;> >
Plot(M,"",1,1);Plot(MUP,"",2,1);Plot(MDOWN,"",2,1);> >
Plot(NEWMUP,"",4,1);Plot(NEWMDOWN,"",4,1);> >
Title=Name()+",Width="+WriteVal(10*G,1.1)+"%, OLD INS="+WriteVal>
(INS0,1.0)+"%"+", NEW INS="+WriteVal(NEWINS,1.0)+"%";> >
PlotShapes((Cum(1)==LastValue(Cum(1))-LOOKBACK)>
*shapeUpTriangle,colorBlue);> > OUT=C<NEWMDOWN OR
C>NEWMUP;> >
PlotShapes(F*OUT*shapeSmallCircle,colorBrightGreen);> >
Filter=Sum(OUT,3)>=1;// EXPLORE FOR THE N=1 LAST QUOTATIONS> >
AddColumn(10*g,"WIDTH %");> > AddColumn(C,"C");> >
AddColumn(NEWMUP,"NEWMUP");> > AddColumn(NEWMDOWN,"NEWMDOWN");>
> > > For Indicator builder set scaling to Automatic.> >
For AA, explore for the n=1 last quotations to investigate if some >
green circle appeared the last 3 bars.> > The initial Width 20% is too
much for the majority of stocks. AAPL > is responsible for this choice :
the OLDINS is 93% and > > AAPL needs a new Width 24% to give the 95%
!!! May2003 is still > included in the 100-bar test period and causes
this > > behavior. If AAPL is cool the next 15 bars, the Width will
become > more reasonable and useful for price speculation.> >
The N100 champion was NVDA. It needs a Width=29% [!!!] and does > not
like this method.> > See the various Widths by replacing the filter
condition to > Filter=1; Many stocks are below 10% .> >
Dimitris Tsokakis> > PS1. The formula is not proper for
backtesting.> > PS2. For more accurate results you may decrease the
STEP=0.01, to > STEP=0.005; or even to STEP=0.001; with the> >
unavoidable slow down of the procedure .> > >
------------------------ Yahoo! Groups Sponsor
---------------------~-->> Buy Remanufactured Ink Cartridges &
Refill Kits at MyInks.com for: HP $8-20. Epson $3-9, Canon $5-15, Lexmark $4-17.
Free s/h over $50 (US & Canada).> <A
href=""><FONT
size=2>http://www.c1tracking.com/l.asp?cid=6351<FONT
size=2>> <A
href=""><FONT
size=2>http://us.click.yahoo.com/0zJuRD/6CvGAA/qnsNAA/GHeqlB/TM<FONT
size=2>>
---------------------------------------------------------------------~->>
> Send BUG REPORTS to <A
href=""><FONT
size=2>bugs@xxxxxxxxxxxxx> Send
SUGGESTIONS to <A
href=""><FONT
size=2>suggest@xxxxxxxxxxxxx>
-----------------------------------------> Post AmiQuote-related messages
ONLY to: <FONT
size=2>amiquote@xxxxxxxxxxxxxxx
> (Web page: <A
href=""><FONT
size=2>http://groups.yahoo.com/group/amiquote/messages/<FONT
size=2>)> --------------------------------------------> Check
group FAQ at: <A
href=""><FONT
size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT
size=2> > > Your use of Yahoo! Groups is subject to
<FONT
size=2>http://docs.yahoo.com/info/terms/<FONT
size=2> > >
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|