SHARE
TWEET

CCI OB and OS

a guest Sep 27th, 2015 193 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Modified by Ivan Labrie on 04-11-2015
  2. //Created by ChrisMoody on 10-17-2014 by user request.
  3.  
  4. study(title="CCI OB and OS signals", shorttitle="CCI OB and OS", overlay=true)
  5. length2 = input(11, minval=1, title="CCI Length")
  6. cciT = input(100, minval=50, maxval=200, title="CCI Trigger Lines, Converts to +100,-100 - +200,-200 etc.")
  7. scci = input(true, title="Show CCI BackGround Highlight")
  8. //CCI Code
  9. ma = sma(close, length2)
  10. cci = (close - ma) / (0.015 * dev(close, length2))
  11. cciTA = 0 + cciT
  12. cciTB = 0 - cciT
  13. //CCI Criteria Definitions
  14. cciA = cci > cciTA ? 1 : 0
  15. cciB = cci < cciTB ? 1 : 0
  16. //CCI Color Plots
  17. condCCI = scci and cciA ? green : scci and cciB ? red : na
  18. //Background Highlights
  19. bgcolor(condCCI, transp=50)
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top