SHARE
TWEET

Absolute Strength Index [LazyBear]

lazybeartv May 13th, 2015 1,238 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. // @author LazyBear
  3. //
  4. // List of my public indicators: http://bit.ly/1LQaPK8
  5. // List of my app-store indicators: http://blog.tradingview.com/?p=970
  6. //
  7. study("Absolute Strength Index [LazyBear]", shorttitle="ABSSI_LB")
  8. lma=input(21, title="EMA Length")
  9. ld=input(34, title="Signal Length")
  10. osl=10
  11. calc_abssio( ) =>
  12.     A=iff(close>close[1], nz(A[1])+(close/close[1])-1,nz(A[1]))
  13.     M=iff(close==close[1], nz(M[1])+1.0/osl,nz(M[1]))
  14.     D=iff(close<close[1], nz(D[1])+(close[1]/close)-1,nz(D[1]))
  15.     iff (D+M/2==0, 100, 100-100/(1+(A+M/2)/(D+M/2)))
  16.  
  17. abssi=(calc_abssio()  )
  18. plot(abssi, color=blue, linewidth=2, title="ABSSI")
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