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: http://pastebin.com/jz6QL45G
- DEnvelope %B : http://pastebin.com/r4XfrDvd

Sample chart with above indicators: https://www.tradingview.com/v/dK1uhbN8/#...
إزالة من البرامج النصية المفضلة أضف إلى البرامج النصية المفضلة
//
// @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)
List of my free indicators: http://bit.ly/1LQaPK8
List of my indicators at Appstore: http://blog.tradingview.com/?p=970

التعليقات

Fantastic, LB. Here's a comparison for the benefit of people visiting this post.
+5 رد
Hi LB,

I am trying to save script in //@version=3, but it is not allowing me? Could you help.Thanks for all the Good work.
//@version=3
// @author LazyBear
// List of all my indicators:
//
study("DEnvelope ", 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),ut=alp*mt+(1-alp)*nz(ut)
dt=((2-alp)*mt-ut)/(1-alp)
mt2=alp*abs(src-dt)+(1-alp)*nz(mt2)
ut2=alp*mt2+(1-alp)*nz(ut2)
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)
رد
Interesting. Someone used your code and adapted it for ThinkOrSwim and added additional features:

"This is a TOS version of the LazyBear's DEnvelope (Better Bollinger Bands) for TradingView. My TOS version comes with additional features : 2 deviations, 3 clouds added, arrows on first or second deviation and alerts."

http://www.smart-trading.world-record.ch/en/index.php/tos-donational-studies/55-better-bb
رد
LazyBear ChartArt
Thanks for the link. I am amazed how many ppl have ported my stuff to ToS and MT4...I have also seen some port my Pinescript port of a MT4 indicator back to MT4 :)
رد
I'm going to test this against the classic Bollinger Bands from now on. BTW: This BTC chart below is so amazingly undecided in no clear direction that I had to share it for the sake of history :)

رد
Great job LB, it might also be interesting to do a Bandwidth with those bands too
رد
LazyBear AlexandreFF
Here you go...DEnvelope Bandwidth and %B. I will update the desc with the pastebin links.

+1 رد
AlexandreFF LazyBear
You're Amazing ! Thank you
رد
MONEYMENOW AlexandreFF
new to indicators .. does first inidcator mean volatility and the second %b indicates momentum
رد
LazyBear MONEYMENOW
Denv is similar to Bollinger Bands...provides a framework for including volatility while charting. More info on the rest below:
- DenvWidth is similar to BB Width: https://www.tradingview.com/stock-charts-support/index.php/Bollinger_Bands_Width_(BBW)
- Denv%B is similar to BB %B: https://www.tradingview.com/stock-charts-support/index.php/Bollinger_Bands_%25B_(%25B)

رد
الصفحة الرئيسية منصة الأسهم منصًة العملات منصّة العملات الرقمية جدول الأعمال الاقتصادي كيف نعمل مميزات الرسم البياني أسعار العضوية إحالة صديق قوانين الموقع مركز المساعدة حلول المواقع الإلكترونية والوسطاء الأدوات حلول الرسوم البيانية مكتبة الرسوم البيانية صغيرة الحجم المدوّنة والأخبار تويتر
ملف التعريف إعدادات الصفحة الشخصية الحساب وإعداد الفواتير إحالة صديق تذاكر الدعم الخاصة بي مركز المساعدة التحاليل المنشورة المتابعين تتابع رسالة خاصة المحادثة تسجيل الخروج