daily pastebin goal
84%
SHARE
TWEET

EC_RSI Plus EMA

a guest Sep 25th, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. study(title="CM_RSI_EMA", shorttitle="CM_RSI_EMA_", overlay=false)
  2. src = close,
  3. len = input(20, minval=1, title="RSI Length")
  4. len2 = input(10, minval=1, title="EMA of RSI Length")
  5. up = rma(max(change(src), 0), len)
  6. down = rma(-min(change(src), 0), len)
  7. rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
  8. emaRSI = ema(rsi,len2)
  9.  
  10. plot(rsi, title="RSI", style=area, linewidth=3, color=silver)
  11. plot(emaRSI, title="EMA of RSI", style=area, linewidth=2, color=red)
  12. band1 = hline(80, title="Upper Line", linestyle=dashed, linewidth=3, color=red)
  13. band0 = hline(20, title="Lower Line", linestyle=dashed, linewidth=3, color=lime)
  14. fill(band1, band0, color=purple, transp=90)
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