LazyBear

DEnvelope [Better Bollinger Bands]

*** ***

Bollinger Bands (BB) usually expand quickly after a volatility increase but contract more slowly as volatility declines. This extended time it takes for BB to contract after a volatility drop can make trading some instruments using BB alone difficult or less profitable.

In the October 1998 issue of "Futures" there is an article written by Dennis McNicholl called "Better Bollinger Bands", in which the author recommends improving BB by modifying:
- the center line formula &
- different equations for calculating the bands.

These bands, called "DEnvelope", follow price more closely and respond faster to changes in volatility with these modifications.

Fore more indicators, check out my "Master Index of indicators" (Also check my published charts page for new ones I haven't added to that list):

More scripts related to DEnvelope:
------------------------------------------------
- DEnvelope Bandwidth: pastebin.com/jz6QL45G
- DEnvelope %B : pastebin.com/r4XfrDvd

Sample chart with above indicators: www.tradingview.com/v/dK1uhbN8/

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?
//
// @author LazyBear 
// List of all my indicators: https://www.tradingview.com/v/4IneGo8h/
//
study("DEnvelope [LazyBear]", shorttitle="DENV_LB", overlay=true)
lb=input(20, title="DEnvelope lookback length")
de=input(2, title="DEnvelope band deviation")
alp=2/(lb+1)
src=hlc3
mt=alp*src+(1-alp)*nz(mt[1])
ut=alp*mt+(1-alp)*nz(ut[1])
dt=((2-alp)*mt-ut)/(1-alp)
mt2=alp*abs(src-dt)+(1-alp)*nz(mt2[1])
ut2=alp*mt2+(1-alp)*nz(ut2[1])
dt2=((2-alp)*mt2-ut2)/(1-alp)
but=dt+de*dt2
blt=dt-de*dt2
plot(but, color=red, linewidth=2)
plot(dt, color=gray)
plot(blt, color=green, linewidth=2)