Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. //@version=3
  2. study(shorttitle="BB+%", title="Bollinger Bands plus Percent Indicator", overlay=true)
  3. length = input(20, minval=1)
  4. src = input(close, title="Source")
  5. mult = input(2.0, minval=0.001, maxval=50)
  6. basis = sma(src, length)
  7. dev = mult * stdev(src, length)
  8. upper = basis + dev
  9. lower = basis - dev
  10. plot(basis, color=#cc0000)
  11. p1 = plot(upper, color=#33cccc)
  12. p2 = plot(lower, color=#33cccc)
  13. fill(p1, p2, color=#00ffff, transp=97)
  14.  
  15. high_symbol = barstate.islast ? open + (open * 0.1) : na
  16. low_symbol = barstate.islast ? open - (open * 0.1) : na
  17. plotshape (high_symbol, style=shape.diamond, color=#00ffff, location=location.absolute, show_last = 1)
  18. plotshape (low_symbol, style=shape.diamond, color=#00ffff, location=location.absolute, show_last = 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement