CapnOscar

RMATrix

Just Another Help For Trend.. Dont ask me how it works.. 10110110 ?
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?
//Coded by CapnOscar on 16.04.2015 - Say Thanks? 
study(title="RMATrix" , shorttitle="RMATrix" )

UpTrend = input(52, minval=50, title="Uptrend" )
DownTrend = input(48, maxval=50, title="DownTrend" )

//Define The Lines 
bandmax = hline(100)
bandhi = hline(0)

//MicroTrend
src0 = close, len0 = input(5, minval=1, title="TinyTrend" )
up0 = rma(max(change(src0), 0), len0)
down0 = rma(-min(change(src0), 0), len0)
rsi0 = down0 == 0 ? 100 : up0 == 0 ? 0 : 100 - (100 / (1 + up0 / down0))
//PlaceTiny
smrsi0 = rsi0 >= 0 ? 80 : na
//ColorMajorRSI
tinyc0 = rsi0 > UpTrend ? green : rsi0 < DownTrend ? red : orange
plotshape(smrsi0, style=shape.labelup, location=location.absolute, text='o', color=tinyc0, textcolor=tinyc0)



//TinyTrend
src = close, len = input(7, minval=1, title="MiniTrend" )
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
//PlaceTiny
smrsi = rsi >= 0 ? 60 : na
//ColorMajorRSI
tinyc = rsi > UpTrend ? green : rsi < DownTrend ? red : orange
plotshape(smrsi, style=shape.labelup, location=location.absolute, text='o', color=tinyc, textcolor=tinyc)

//MiniTrend
src2 = close, len2 = input(21, minval=1, title="Trend" )
up2 = rma(max(change(src2), 0), len2)
down2 = rma(-min(change(src2), 0), len2)
rsi2 = down2 == 0 ? 100 : up2 == 0 ? 0 : 100 - (100 / (1 + up2 / down2))
//PlaceTiny
smrsi2 = rsi2 >= 0 ? 40 : na
//ColorMajorRSI
tinyc2 = rsi2 > UpTrend ? green : rsi2 < DownTrend ? red : orange
plotshape(smrsi2, style=shape.labelup, location=location.absolute, text='o', color=tinyc2, textcolor=tinyc2)


//MajorTrend
src3 = close, len3 = input(84, minval=1, title="MajorTrend" )
up3 = rma(max(change(src3), 0), len3)
down3 = rma(-min(change(src3), 0), len3)
rsi3 = down3 == 0 ? 100 : up3 == 0 ? 0 : 100 - (100 / (1 + up3 / down3))
//PlaceTiny
smrsi3 = rsi3 >= 0 ? 20 : na
//ColorMajorRSI
tinyc3 = rsi3 > UpTrend ? green : rsi2 < DownTrend ? red : orange
plotshape(smrsi3, style=shape.labelup, location=location.absolute, text='o', color=tinyc3, textcolor=tinyc3)