Advertisement
lazybeartv

Absolute Strength Index [LazyBear]

May 13th, 2015
3,154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  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")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement