Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // @author LazyBear
- // List of all my indicators:
- // https://docs.google.com/document/d/15AGCufJZ8CIUvwFJ9W-IKns88gkWOKBCvByMEvm5MLo/edit?usp=sharing
- //
- study(title="Custom Bollinger Bands Width [LazyBear]", shorttitle="CBBW_LB")
- source = close
- length = input(20, minval=1), mult = input(2.0, minval=0.001, maxval=50)
- basis = sma(source, length)
- dev = mult * stdev(source, length)
- upper = basis + dev
- lower = basis - dev
- bbw = (upper-lower)/basis
- overlayMode=input(false)
- plot(not overlayMode ? bbw : na, color=blue)
- threshold=input(0.045)
- hline(threshold)
- c=close<basis?red:green
- bgcolor(bbw<=threshold?c:na)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement