Advertisement
Guest User

RSI + ROC + MACD + CCI + STOCHK [LazyBear TV indicator]

a guest
May 4th, 2014
13,799
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. //
  2. // @author LazyBear
  3. // If you use this code in its original or modified form, do drop me a PM. Thanks.
  4. //
  5. study(title="RSI++ [LazyBear]")
  6. lengthRSI=input(25)
  7. lengthROC=input(25)
  8. src=close
  9. overbought=input(0)
  10. oversold=input(0)
  11.  
  12. fastMACDLength=input(10)
  13. slowMACDLength=input(21)
  14. lengthCCI = input(50)
  15.  
  16. lengthStoch=input(14)
  17. smoothK=input(3)
  18.  
  19. macd(source, fastLength, slowLength) =>
  20. fastMA = ema(source, fastLength)
  21. slowMA = ema(source, slowLength)
  22. fastMA - slowMA
  23.  
  24. acc=(rsi(src , lengthRSI) +
  25. roc(src , lengthROC) +
  26. macd(src, fastMACDLength, slowMACDLength) +
  27. cci(src, lengthCCI) +
  28. sma(stoch(close, high, low, lengthStoch), smoothK)) / 5.0
  29.  
  30. acc_ob=acc>overbought
  31. acc_os=acc<oversold
  32. plot(acc , color=acc_ob?red : acc_os?green : white , linewidth=1)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement