Rank: Newbie
Groups: Registered, Registered Users Joined: 10/22/2005(UTC) Posts: 1
|
crwinnr5 wrote:Here is the Width computation for BBands:
(BBandTop(C,20,S,2)-BBandBot(C,20,S,2))/(Mov(BBandTop(C,20,S,2),20,S)+(Mov(BBandBot(C,20,S,2),20,S)))/2
try this
a0:= Input("RSI Periods",3,34,5);
c1:= Input("Upper Level",10,90,70);
c2:= Input("50 Level",10,90,50);
c3:= Input("Lower Level",10,90,30);
a1:= CLOSE;
a2:= ROC(a1,1,$);
a3:= a2*(a2>0);
a4:= a2*(a2<0);
aa:= (PREV*(a0-1)+a3)/a0;
dd:= (PREV*(a0-1)+a4)/a0;
dd:= Abs(dd);
UL:= a1+(a0-1)*Max(dd*c1/(100-c1)-aa,dd-aa/(c1/(100-c1)));
MM:= a1+(a0-1)*Min(dd*(100/(100-c2)-1)-aa,dd-aa/(100/(100-c2)-1));
LL:= a1+(a0-1)*Min(dd*c3/(100-c3)-aa,dd-aa/(c3/(100-c3)));
UL;MM;LL;
|