Stochastic Momentum Index indicator
// Coded by FW study("Stochastic Momentum Index", shorttitle = "SMI", overlay = false) nn = input(5, "Period", minval = 1) ns = input(3, "Smoothing", minval = 1) nd = input(3, "Double Smoothing", minval = 1) s = input(3, "Signal Period", minval = 1) hh = highest(high, nn) ll = lowest(low, nn) ap = (hh + ll) / 2 range = (hh - ll) k = 100 * (ema(ema(close - ap, ns), nd) / (ema(ema(range, ns), nd) / 2)) d = ema(k, s) plot(k, color = blue, title = "Stochastic Momentum Index") plot(d, color = red, title = "SMI Signal Line") hline(40, color = red, title = "Overbought") hline(-40, color = green, title = "Oversold") hline(0, color = black, title = "Zero Line")