xmd79

Talep Konsantrasyon Eğrisi Plus

Oct 1st, 2021
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. //@version=4
  2. //AUTHOR: Masoud Azizi http://github.com/mablue
  3. study("Talep Konsantrasyon Eğrisi Plus", shorttitle="TKE+", overlay=false, format=format.price, precision=2, resolution="")
  4. period = input(14, title="period", type=input.integer, minval=1, maxval=500)
  5. emaperiod = input(5, title="EMAperiod", type=input.integer, minval=1, maxval=500)
  6. emamul = input(1.5, title="EMAperiod", type=input.float, minval=0, maxval=2)
  7. TKE = input(true, title="Show TKE Line?")
  8. EMA = input(true, title="Show EMA Line?")
  9. momentum = close / close[period] * 100
  10. cci = cci(hlc3, period)
  11. rsi = rsi(close, period)
  12. willr = (highest(high, period) - close) / (highest(high, period) - lowest(low, period)) *
  13. -100
  14. stosk = stoch(close, high, low, period)
  15. upper_s = sum(volume * (change(hlc3) <= 0 ? 0 : hlc3), period)
  16. lower_s = sum(volume * (change(hlc3) >= 0 ? 0 : hlc3), period)
  17. mfi = rsi(upper_s, lower_s)
  18. spacing = input(7)
  19. length7 = input(7, minval=1)
  20. length14 = input(14, minval=1)
  21. length28 = input(28, minval=1)
  22. average(bp, tr_, length) =>
  23. sum(bp, length) / sum(tr_, length)
  24. high_ = max(high, close[1])
  25. low_ = min(low, close[1])
  26. bp = close - low_
  27. tr_ = high_ - low_
  28. avg7 = average(bp, tr_, length7)
  29. avg14 = average(bp, tr_, length14)
  30. avg28 = average(bp, tr_, length28)
  31. ult = 100 * (4 * avg7 + 2 * avg14 + avg28) / 7
  32. TKEline = (ult + mfi + momentum + cci + rsi + willr + stosk) / 7
  33. EMAline = ema(TKEline, emaperiod)*emamul
  34. plot(EMA and EMAline ? EMAline : na, title="EMA Line", style=plot.style_line, linewidth=2, color=color.blue)
  35. plot(TKE and TKEline ? TKEline : na , color=color.red, linewidth=3, title="TKE")
  36. plot(20, color=color.blue, linewidth=0, title="")
  37. plot(80, color=color.red, linewidth=0, title="")
  38. plot(0, color=color.purple, linewidth=0, title="")
  39. plot(cross(TKEline, EMAline) and (EMAline<20)? EMAline : na , style = plot.style_circles, linewidth = 3)
  40. plot(cross(TKEline, EMAline) and (EMAline>70)? EMAline : na ,color=color.rgb(255, 0, 0), style = plot.style_circles, linewidth = 3)
  41.  
Advertisement
Add Comment
Please, Sign In to add comment