SHARE
TWEET

DEnvelope Bandwidth [TradingView Custom Indicator]

a guest Jul 11th, 2014 7,319 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. // @author LazyBear
  3. // List of all my indicators: https://www.tradingview.com/v/4IneGo8h/
  4. //
  5. study("DEnvelope Bandwidth [LazyBear]", shorttitle="DENVBW_LB")
  6. lb=input(20, title="DEnvelope lookback length")
  7. de=input(2, title="DEnvelope band deviation")
  8. alp=2/(lb+1)
  9. src=hlc3
  10. mt=alp*src+(1-alp)*nz(mt[1])
  11. ut=alp*mt+(1-alp)*nz(ut[1])
  12. dt=((2-alp)*mt-ut)/(1-alp)
  13. mt2=alp*abs(src-dt)+(1-alp)*nz(mt2[1])
  14. ut2=alp*mt2+(1-alp)*nz(ut2[1])
  15. dt2=((2-alp)*mt2-ut2)/(1-alp)
  16. but=dt+de*dt2
  17. blt=dt-de*dt2
  18. bbw = (but-blt)/dt
  19. plot(bbw, color=blue, linewidth=2)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top