[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: Better Bollinger Band



PureBytes Links

Trading Reference Links

David,

Using Ref(X,-1) does not shift in or out. It simply moves the data left or right. 

Changing the standard deviation multiplier will.

Since a change to the moving average will effect the band just use the ref there if you must.

X:= Mov(C,20,E);
UpperBand:X + (2*(std(C,20)));
MiddleBand:= X;
LowerBand:= X - (2*(std(C,20)));
UpperBand;Middleband;LowerBand;


Preston




--- In equismetastock@xxxxxxxxxxxxxxx, "david.travis08" <david.travis08@xxx> wrote:
>
> excuse me for my late reply....
> 
> 
> but can you please let me know which part of this bollinger band ( the moving average part or standard deviation) I can attach ref(x,-1) so that it can shift in or out?
> 
> Regards,
> 
> 
> David
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@> wrote:
> >
> > Hi David,
> > 
> > The "Better Bollinger Band" uses exponential smoothing rather than the simple smoothing that Bollinger originally used.
> > 
> > You can find Bollinger indciators here:
> > http://trader.online.pl/MSZ/e-0-tytulowa-b.html
> > 
> > Basically the formulas for the bands, less all the bells and whistles are:
> > 
> > Upper Band:
> > mov( C,20,Simple ) + ( 2 * ( std( C ,20 ) ) )
> >  
> > Middle Band:
> > mov( C,20,Simple )
> > 
> > Lower Band:
> > mov( C,20,Simple ) - ( 2 * ( std( C ,20 ) ) )
> > 
> > 
> > In order to change the formula to the "Better" version all that is needed is to change the word simple to exponential...or just use E.
> > 
> > You can also change the distance between the upper and lower bands by changing the number 2 to something smaller, like 1.5 . This will give you tighter bands.
> > 
> > By using the "ref" function you would shift the values back in time. Ref(X,-1) would give you the calculated values from yesterday. 
> > 
> > Using Ref(X,1) would not yield any results since tomorrow's data is not known. 
> > 
> > 
> > Hope this helps,
> > 
> > 
> > Preston
> > 
> > 
> > 
> > 
> >  
> > 
> > 
> > --- In equismetastock@xxxxxxxxxxxxxxx, "david.travis08" <david.travis08@> wrote:
> > >
> > > Hello everyone,
> > > 
> > > Can someone in this forum tell me how to code these indicators so that it shift faster from horizontal region?
> > > 
> > > Someone in Equis International has pointed me out to us ref() within the indicator builder for shift in and out function. Now I am quite confuse because this fuction is referencing tomorrow??
> > > 
> > > Any one  please???!!!
> > > 
> > > a)
> > > 
> > > 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
> > > 
> > > ----------------------------------------------------------------------------------------------------
> > > 
> > > b
> > > 
> > > Better Bollinger Bands II 
> > > 
> > > Lb:=Input("Look-Back Period ?",3,100,20);
> > > De:=Input("Band Deviation ?",.5,3,2);
> > > Alp:=2/(Lb+1);
> > > Mt:=Alp*CLOSE+(1-Alp)*PREV;
> > > Ut:=Alp*Mt+(1-Alp)*PREV;
> > > Dt:=((2-Alp)*Mt-Ut)/(1-Alp);
> > > mt2:=Alp*Abs(C-Dt)+(1-Alp)*PREV;
> > > ut2:=Alp*mt2+(1-alp)*PREV;
> > > dt2:=((2-Alp)*mt2-ut2)/(1-Alp);
> > > But:=Dt+de*dt2;
> > > Blt:=Dt-de*dt2;
> > > But;
> > > Dt;
> > > Blt;
> > >
> >
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/