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
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
//
// @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)