//@version=4 //Indicators used by JN made by Angel Chacon (AngelRChaconM) study(title="RSI Scalpin", shorttitle="RSI Scalpin", format=format.price, precision=2) //RSI srcRSI = close, lenRSI = input(14, minval=1, title="Length RSI") up = rma(max(change(srcRSI), 0), lenRSI) down = rma(-min(change(srcRSI), 0), lenRSI) rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down)) plot(rsi, color=color.white, linewidth=2) b1 = hline((70),title="banda Superior RSI") b0 = hline((30),title="banda Inferior RSI") b2 = hline((50),title="banda Media RSI") fill(b1, b0, color=color.teal, transp=100,title="Rsi") //Stoch periodK = input(14, title="Stoch K", minval=1) periodD = input(6, title="Stoch D", minval=1) smoothK = input(6, title="Stoch Smooth", minval=1) k = sma(stoch(close, high, low, periodK), smoothK) d = sma(k, periodD) plot(k, title="%K Stoch", color=color.yellow, linewidth=2) plot(d, title="%D Stoch", color=color.red , linewidth=2) //DMI Stoch // WWMA wwma(l,p) => wwma = 0.0 wwma := (nz(wwma[1])*(l-1)+p)/l //VALUES DMIlength = input(20) Stolength = input(5) //DMI CALC hiDiff = high - high[1] loDiff = low[1] - low plusDM = (hiDiff>loDiff)and(hiDiff>0)?hiDiff:0 minusDM = (loDiff>hiDiff)and(loDiff>0)?loDiff:0 ATR = wwma(DMIlength, tr) PlusDI = 100*wwma(DMIlength,plusDM)/ATR MinusDI = 100*wwma(DMIlength,minusDM)/ATR osc = PlusDI-MinusDI // DMI STOCH CALC hi = highest(osc, Stolength) lo = lowest(osc, Stolength) Stoch = sum((osc-lo),Stolength)/sum((hi-lo),Stolength)*100 plot(Stoch, color=color.navy, title='DMI-Stochastic', transp=100,linewidth=2) p0 = 0 p1 = 100 p2 = 80 p3 = 20 crossUp = Stoch[1]<10 and Stoch>10 ? 1 : 0 crossDown = Stoch[1]>90 and Stoch < 90 ? 1 : 0 plot (p3, color = color.red, linewidth = 1, title = 'Over Bought' ) plot (p2, color = color.green, linewidth = 1, title = 'Over Sold' ) plotchar(crossUp, title = "SOBRE COMPRA", char = 'B', text= "BUY", location=location.bottom, color = color.green, transp = 0, offset = 0) plotchar(crossDown, title = "SOBRE VENTA",char = 'S', text= "SELL" ,offset = 0, location = location.top, color = color.red, transp=0) //----------------------------