PureBytes Links
Trading Reference Links
|
Hi,
I've been diddling around with this Sigma Band thing, so here's my 2
cents worth.....
I'm not sure how to drop the flat section at the end of the offset
lines. Any ideas?
The drawback of the Sigma Lines is that it's all in the past. The lines
need to be projected into the future. Can the AFL handle this type of thing?
Hope this helps us all along..... Wayne
******************************
/* SIGMA BANDS ??? */
//gaussian average (Ehlers)
pd= Param("Periods",21,3,101,2); // odd number here
Offset= (pd-1)/2;
p1= Ref((H+L)/2,Offset);
price= (p1+3.5*Ref(p1,-1)+4.5*Ref(p1,-2)+3*Ref(p1,-3)+0.5*Ref(p1,-4)
-0.5*Ref(p1,-5)-1.5*Ref(p1,-6))/10.5; //Ehlers smoothing filter
TL= Ref(scGauss4ord(price,pd),Offset); //from Ehlers .dll file
deltaUP= HHV(H,Offset) - TL;
deltaDN= TL - LLV(L,Offset);
devUP = StDev(deltaUP,250);
devDN = StDev(deltaDN,250);
Plot(Ref(TL,Offset),"CMA",43,4);
Plot( Ref(TL,Offset) + devUP , "Ch+1", 29 );
Plot( Ref(TL,Offset) - devDN , "Ch-1", 29 );
Plot( Ref(TL,Offset) + 2*devUP ,"Ch+2", 42 );
Plot( Ref(TL,Offset) - 2*devDN ,"Ch-2", 42 );
Plot( Ref(TL,Offset) + 3*devUP,"Ch+3", 32 );
Plot( Ref(TL,Offset) - 3*devDN,"Ch-3", 32);
Plot(C,"",colorBlack,64);
Mr Valley wrote:
> Would someone compare this and post?
> Is this what you had in mind?
>
>
>
> /* Centered MA Sigma Bands */
>
> pds = Var = 128; // Select time frame
>
> CMA =Ref(MA(*C*,pds),(pds/2+1));
>
> G0 = BBandTop(CMA , Var, 2);
>
> G3 = BBandBot(CMA , Var, 2);
>
> G10 = BBandTop(CMA , Var, 1);
>
> G13 = BBandBot(CMA , Var, 1);
>
> G111 = BBandTop(CMA , Var, 1.5);
>
> G333 = BBandBot(CMA , Var, 1.5);
>
> G22 = BBandTop(CMA , Var, .5);
>
> G44 = BBandBot(CMA , Var, .5);
>
> G000= (G22 + G44)/2;
>
>
>
> Plot(G0,"+2",4,4);
>
> Plot(G3,"-2",4,4);
>
> Plot(G10,"+1",4,4);
>
> Plot(G13,"-1",4,4);
>
> Plot(G111,"+1.5",6,4);
>
> Plot(G333,"-1.5",6,4);
>
> Plot(G22,"+.5",7,4);
>
> Plot(G44,"-.5",7,4);
>
> Plot(G000,"0",2,4);
>
> Plot(CMA,"CMA",10,4);
>
> Plot(*C*,"Centered MA Sigma Bands Close",1,64);
>
>
>
> 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
>
>
> ------------------------------------------------------------------------
> *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
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
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
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/
|