Can´t publish the indicator, so copy&paste this on pine editor!

By MartinMaffei
//version=3
study("True Strength Indicator + Moving Average Rate Of Change + Slow Stoch", shorttitle="TSI+MAROC+SlowStoch")
long = input(title="Long Length", type=integer, defval=25)
short = input(title="Short Length", type=integer, defval=13)
signal = input(title="Signal Length", type=integer, defval=13)
price = close
double_smooth(src, long, short) =>
fist_smooth = ema(src, long)
ema(fist_smooth, short)
pc = change(price)
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(abs(pc), long, short)
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
plot(tsi_value / 8, color=#3BB3E4)
plot(ema(tsi_value / 8, signal), color=#FF006E)
hline(0, title="Zero")

// ------------------------------------------------

sma_len = input(21, minval=1, title="SMA len")
roc_len = input(5, minval=1, title="ROC len")
src2 = close

smooth = sma(src2, sma_len)
sma_roc = 100 * (smooth - smooth[roc_len])/smooth[roc_len]
color = sma_roc > sma_roc[roc_len] ? green : red

plot(sma_roc, color=color, title="SMA ROC", style=line)
hline(0)

// ------------------------------------------------

length = input(10, minval=1), smoothK = input(6, minval=1), smoothD = input(3, minval=1)

// Get the real OHLC (useful in not standard chart - like Heikin Ashi)
t = tickerid(syminfo.prefix, ticker)
realO = security(t, period, open)
realH = security(t, period, high)
realL = security(t, period, low)
realC = security(t, period, close)
//palette = realC >= realO ? lime : red
//plotcandle(realO, realH, realL, realC, color=palette)

// Calculation
low_n = lowest(realL, length)
high_n = highest(realH, length)
k = sma(100*((realC-low_n)/(high_n-low_n)), smoothK)
d = sma(k, smoothD)

plot(k/10, color=green)
plot(d/10, color=red)

h0 = hline(7.5)
h1 = hline(2.5)
Technical IndicatorsMoving AveragesOscillators

Disclaimer