SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. study(title="Pig RS%", shorttitle="RS%", overlay=false)
  2.  
  3. //RSI
  4. src = close, len = input(14, minval=1, title="RSI Length")
  5.  
  6. ag = rma(max(change(src), 0), len)
  7. al = rma(-min(change(src), 0), len)
  8. p=input(20,title="period SD")
  9. mult=input(2, title="SD mult")
  10. smooth=input(3, title="smooth")
  11. rs = ag/al
  12. basis = sma(rs, p)
  13. dev = mult * stdev(rs, p)
  14. upper = basis + dev
  15. lower = basis - dev
  16.  
  17. rsp = (rs - lower)/(upper - lower)
  18.  
  19. plot(rsp, color=#40E0D0,linewidth=2, transp=0)
  20. h0 = hline(1, linestyle=dashed)
  21. h1 = hline(0, linestyle=dashed)
  22. h2 = hline(0.5, linestyle=dashed)
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
 
Top