xmd79

Stochastic Rsi Eklentili

Oct 9th, 2021
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. //@version=4
  2. study(title="SR REDJ0HN", shorttitle="Stoch RSI", format=format.price, precision=2, resolution="")
  3. smoothK = input(3, "K", minval=1)
  4. smoothD = input(3, "D", minval=1)
  5. lengthRSI = input(14, "RSI Length", minval=1)
  6. lengthStoch = input(14, "Stochastic Length", minval=1)
  7. src = input(close, title="RSI Source")
  8. rsi1 = rsi(src, lengthRSI)
  9. k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
  10. d = sma(k, smoothD)
  11. plot(k, "K", color=#2962FF, linewidth=2)
  12. plot(d, "D", color=#FF6D00, linewidth=2)
  13. h0 = hline(80, "Upper Band", color=#FF5252)
  14. h1 = hline(20, "Lower Band", color=#4CAF50)
  15. h2 = hline(100, "Upper Band", color=#363A45)
  16. h3 = hline(0, "Lower Band", color=#363A45)
  17.  
  18.  
  19. buySignalr = crossover(k, d)
  20. plotshape(buySignalr ? k*0.950 : na, title="Buy", text="*", location=location.absolute, style=shape.labelup, size=size.tiny, color=color.green, textcolor=color.white, transp=0)
  21. sellSignallr = crossunder(k, d)
  22. plotshape(sellSignallr ? d*1.050 : na, title="Sell", text="-", location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.red, textcolor=color.white, transp=0)
  23.  
Advertisement
Add Comment
Please, Sign In to add comment