Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. //
  2. // @author LazyBear
  3. // List of all my indicators:
  4. // https://docs.google.com/document/d/15AGCufJZ8CIUvwFJ9W-IKns88gkWOKBCvByMEvm5MLo/edit?usp=sharing
  5. //
  6. study(title="Custom Bollinger Bands Width [LazyBear]", shorttitle="CBBW_LB")
  7. source = close
  8. length = input(20, minval=1), mult = input(2.0, minval=0.001, maxval=50)
  9. basis = sma(source, length)
  10. dev = mult * stdev(source, length)
  11. upper = basis + dev
  12. lower = basis - dev
  13. bbw = (upper-lower)/basis
  14. overlayMode=input(false)
  15. plot(not overlayMode ? bbw : na, color=blue)
  16. threshold=input(0.045)
  17. hline(threshold)
  18. c=close<basis?red:green
  19. bgcolor(bbw<=threshold?c:na)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement