xmd79

TradeMax Estoctuning

Jun 16th, 2022
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. //@version=5
  2. //Author: https://www.tradingview.com/u/Wemersonmax
  3. indicator('TradeMax Estoctuning')
  4.  
  5. length = input(14, 'Length')
  6.  
  7. src = input(hlc3)
  8. k1 = ta.ema(ta.sma(ta.stoch(src, high, low, length), 3), 3)
  9. k2 = ta.ema(ta.sma(ta.stoch(src, high, low, length), 4), 3)
  10. k3 = ta.ema(ta.sma(ta.stoch(src, high, low, length), 5), 3)
  11. k4 = ta.ema(ta.sma(ta.stoch(src, high, low, length), 6), 3)
  12. k5 = ta.ema(ta.sma(ta.stoch(src, high, low, length), 7), 3)
  13. k6 = ta.ema(ta.sma(ta.stoch(src, high, low, length), 8), 3)
  14. k7 = ta.ema(ta.sma(ta.stoch(src, high, low, length), 9), 3)
  15. k8 = ta.ema(ta.sma(ta.stoch(src, high, low, length), 10), 3)
  16.  
  17. plot(k1, linewidth=2, color=k1 >= k2 ? color.lime : color.red)
  18. plot(k2, linewidth=2, color=k2 >= k3 ? color.lime : color.red)
  19. plot(k3, linewidth=2, color=k3 >= k4 ? color.lime : color.red)
  20. plot(k4, linewidth=2, color=k4 >= k5 ? color.lime : color.red)
  21. plot(k5, linewidth=2, color=k5 >= k6 ? color.lime : color.red)
  22. plot(k6, linewidth=2, color=k6 >= k7 ? color.lime : color.red)
  23. plot(k7, linewidth=2, color=k7 >= k8 ? color.lime : color.red)
  24. plot(k8, linewidth=2, color=k8 >= k8[1] ? color.lime : color.red)
  25.  
  26. upline = hline(80, color=color.white, title='OB Level')
  27. midline = hline(50, linewidth=1, title='Mid Level')
  28. downline = hline(20, color=color.white, title='OS Level')
  29.  
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment