Guest User

DEnvelope Bandwidth [TradingView Custom Indicator]

a guest
Jul 11th, 2014
7,594
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×