SHARE
TWEET

Stochastic CCI MTF w/ UP/DOWN colours - squattter

a guest Aug 8th, 2016 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. study(title="Stochastic CCI MTF w/ UP/DOWN colours - squattter")
  2. smoothK = input(3, minval=1)
  3. smoothD = input(3, minval=1)
  4. lengthRSI = input(14, minval=1, title="CCI Length")
  5. lengthStoch = input(14, minval=1, title="Stoch Length")
  6. src = input(close, title="RSI Source")
  7. useCurrentRes = input(true, title="Use Current Chart's Timeframe?")
  8. resCustom = input(title="Timeframe", defval="480")
  9. res = useCurrentRes ? period : resCustom
  10.  
  11. rsi1 = cci(src, lengthRSI)
  12. k = security(tickerid, res, sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK))
  13. d = security(tickerid, res, sma(k, smoothD))
  14. cClr = k > d[1] ? aqua : aqua
  15. plot(k, color=cClr, linewidth=3, transp=0, title="K")
  16. plot(d, color=white, transp=0, title="D")
  17. h0 = hline(80)
  18. h1 = hline(20)
  19. fill(h0, h1, color=purple, transp=90)
  20. h2 = hline(50, linewidth=1, color=red)
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