Guest User

Stochastic CCI MTF w/ UP/DOWN colours - squattter

a guest
Aug 8th, 2016
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  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)
Add Comment
Please, Sign In to add comment