PureBytes Links
Trading Reference Links
|
Ken,
I use BB that way :
A down swing : from a top UpBB, I place an extended line that is a
parallel of the regressive line of the last swing (the price).
That extended line must bump into the UpBB and stay inside the BB. Other
else some market's patterns could drive you against the swing. Of course
in this case the parallel become a triangle or what ever.
Each new projection of the UpBB is a new point to move and to anchor the
extended line, for the next swing. And so on.
The same in reversal for an up swing.
It's a good way to find the end of a swing. My favorite time unit is 2
minutes with standard values BB(20).
To come back to your question, "better BB" allow that system. Standard
BB not.
Best regards
Ken Close a écrit :
>
>
>
> So what makes these better bollinger bands better than standard? They
> look "tighter" to me, but I have not done any comparative studies.
>
> Anyone?
>
> ------------------------------------------------------------------------
> *From:* amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> *On Behalf Of *Tomasz Janeczko
> *Sent:* Sunday, February 15, 2009 3:53 AM
> *To:* amibroker@xxxxxxxxxxxxxxx
> *Subject:* Re: [amibroker] Better Bollinger Bands
>
>
> Hello,
>
> Replace lines like that:
>
> mt = alpha*C+(1-alpha)*(if(Cum(1)<pds,C,PREV));
>
> with AFL equivalent (simpler):
>
> mt = AMA( C, alpha );
>
> Any other statement involving PREV the same way.
>
> Final result:
>
> pds=Param("Periods",20,2,200);
> sd=Param("Standard Deviations",2, 0.01,10);
> alpha=2/(pds+1);
> mt=AMA( *C*, alpha );
> ut=AMA( mt, alpha );
> dt=((2-alpha)*mt-ut)/(1-alpha);
> mt2=AMA(abs(*C*-dt), alpha );
> ut2=AMA(mt2,alpha );
> dt2=((2-alpha)*mt2-ut2)/(1-alpha);
> but=dt+sd*dt2;
> blt=dt-sd*dt2;
>
> Plot( *C*, "Price", *colorBlack*, *styleCandle* );
> Plot( but, "Upper band", *colorRed* );
> Plot( blt, "Lower band", *colorRed* );
>
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
>
> ----- Original Message -----
> *From:* mohany1@xxxxxxxxxxx <mailto:mohany1@xxxxxxxxxxx>
> *To:* amibroker@xxxxxxxxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx>
> *Cc:* amibroker@xxxxxxxxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx>
> ; amibroker@xxxxxxxxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx>
> *Sent:* Sunday, February 15, 2009 3:37 AM
> *Subject:* [amibroker] Better Bollinger Bands
>
> Someone was asking for this afl. I got around to translating. Enjoy.
>
> Now, if only someone can teach me , really how to make money !!!
>
> /*
> Better Bollinger Bands I
>
> pds:=Input("Periods",2,200,20);
> sd:=Input("Standard Deviations",.01,10,2);
> alpha:=2/(pds+1);
> mt:=alpha*C+(1-alpha)*(if(Cum(1)<pds,C,PREV));
> ut:=alpha*mt+(1-alpha)*(if(Cum(1)<pds,C,PREV));
> dt:=((2-alpha)*mt-ut)/(1-alpha);
> mt2:=alpha*abs(C-dt)+(1-alpha)*PREV;
> ut2:=alpha*mt2+(1-alpha)*PREV;
> dt2:=((2-alpha)*mt2-ut2)/(1-alpha);
> but:=dt+sd*dt2;
> blt:=dt-sd*dt2;
> dt;
> but;
> blt
>
> //------------ easy language -----------
>
> inputs:
> lookback(20),
> mult(2);
>
> vars:
> alpha(0),
> mt(0),
> ut(0),
> dt(0),
> mt2(0),
> ut2(0),
> dt2(0),
> but(0),
> blt(0);
>
> alpha = 2 / (lookback + 1);
> mt = alpha * close + (1 - alpha) * mt;
> ut = alpha * mt + (1 - alpha) * ut;
> dt = ((2 - alpha) * mt - ut) / (1 - alpha);
> mt2 = alpha * absvalue(close - dt) + (1 - alpha) * mt2;
> ut2 = alpha * mt2 + (1 - alpha) * ut2;
> dt2 = ((2 - alpha) * mt2 - ut2) / (1 - alpha);
> but = dt + mult * dt2;
> blt = dt - mult * dt2;
> plot1(dt,"CenterB");
> plot2(but,"UpperB");
> plot3(blt,"LowerB");
> */
>
> _SECTION_BEGIN("Better Bollinger Bands");
> pds = Param("Periods",2,1,200,1);
> SD = Param("sd",3,0.01,5,0.01);
> ALPHA = 2/(PDS+1);
> mt = AMA(C, alpha);
> ut = AMA(mt, alpha);
> dt = ((2 - alpha) * mt - ut) / (1 - alpha);
> //mt2 = alpha * absvalue(Close - dt) + (1 - alpha) * mt2;
> mt2 = AMA(abs(C - dt), alpha);
>
> ut2 = AMA( mt2 , alpha) ;
> dt2 = ((2 - alpha) * mt2 - ut2) / (1 - alpha);
>
> but = dt + sd * dt2;
> blt = dt - sd * dt2;
>
> Plot(but,"Upper Band", colorRed, styleLine);
> Plot(dt,"Cente Band", colorBlue, styleLine);
> Plot(blt,"Lower Band", colorBrightGreen, styleLine);
>
> _SECTION_END();
>
>
>
>
------------------------------------
**** 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
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|