Hi!
I have the Slow Stochastic indicator from TradingView coded in PineScript.
Is it possible convert it in ProBuilder language, please?
Thank you in advance,
A.
study(title="Slow Stochastic", shorttitle="Slow Stochastic")
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, color=green)
plot(d, color=red)
h0 = hline(75)
h1 = hline(25)