CapnOscar

RMATrix

Just Another Help For Trend.. Dont ask me how it works.. 10110110 ?
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//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)