Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=4
- //AUTHOR: Masoud Azizi http://github.com/mablue
- study("Talep Konsantrasyon Eğrisi Plus", shorttitle="TKE+", overlay=false, format=format.price, precision=2, resolution="")
- period = input(14, title="period", type=input.integer, minval=1, maxval=500)
- emaperiod = input(5, title="EMAperiod", type=input.integer, minval=1, maxval=500)
- emamul = input(1.5, title="EMAperiod", type=input.float, minval=0, maxval=2)
- TKE = input(true, title="Show TKE Line?")
- EMA = input(true, title="Show EMA Line?")
- momentum = close / close[period] * 100
- cci = cci(hlc3, period)
- rsi = rsi(close, period)
- willr = (highest(high, period) - close) / (highest(high, period) - lowest(low, period)) *
- -100
- stosk = stoch(close, high, low, period)
- upper_s = sum(volume * (change(hlc3) <= 0 ? 0 : hlc3), period)
- lower_s = sum(volume * (change(hlc3) >= 0 ? 0 : hlc3), period)
- mfi = rsi(upper_s, lower_s)
- spacing = input(7)
- length7 = input(7, minval=1)
- length14 = input(14, minval=1)
- length28 = input(28, minval=1)
- average(bp, tr_, length) =>
- sum(bp, length) / sum(tr_, length)
- high_ = max(high, close[1])
- low_ = min(low, close[1])
- bp = close - low_
- tr_ = high_ - low_
- avg7 = average(bp, tr_, length7)
- avg14 = average(bp, tr_, length14)
- avg28 = average(bp, tr_, length28)
- ult = 100 * (4 * avg7 + 2 * avg14 + avg28) / 7
- TKEline = (ult + mfi + momentum + cci + rsi + willr + stosk) / 7
- EMAline = ema(TKEline, emaperiod)*emamul
- plot(EMA and EMAline ? EMAline : na, title="EMA Line", style=plot.style_line, linewidth=2, color=color.blue)
- plot(TKE and TKEline ? TKEline : na , color=color.red, linewidth=3, title="TKE")
- plot(20, color=color.blue, linewidth=0, title="")
- plot(80, color=color.red, linewidth=0, title="")
- plot(0, color=color.purple, linewidth=0, title="")
- plot(cross(TKEline, EMAline) and (EMAline<20)? EMAline : na , style = plot.style_circles, linewidth = 3)
- plot(cross(TKEline, EMAline) and (EMAline>70)? EMAline : na ,color=color.rgb(255, 0, 0), style = plot.style_circles, linewidth = 3)
Advertisement
Add Comment
Please, Sign In to add comment