//// //// //// smoothK = input.int(3, "K", minval=1) smoothD = input.int(3, "D", minval=1) lengthRSI = input.int(14, "RSI Length", minval=1) lengthStoch = input.int(14, "Stochastic Length", minval=1) src = input(close, title="RSI Source") rsi1 = ta.rsi(src, lengthRSI) k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK) d = ta.sma(k, smoothD) k := n(k, lengthRSI) d := n(d, lengthStoch) plot(k, "K", color=#29f1ff) plot(d, "D", color=#FF6D00) h0 = hline(.8, "Upper Band", color=#787B86, linestyle = hline.style_dotted) hline(.5, "Middle Band", color=color.new(#787B86, 50), linestyle = hline.style_dotted) h1 = hline(.2, "Lower Band", color=#787B86, linestyle = hline.style_dotted)