RicardoSantos

[RS]MA RSI V0

Request for NDBMFB: highlight of overbought / oversold levels on rsi ma's.
开源脚本

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

免责声明

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

想在图表上使用此脚本?
study(title="marsi", shorttitle="marsi", overlay=false)

basis = rsi(close, input(14))

ma1 = sma(basis, input(2))
ma2 = sma(basis, input(13))

oversold = input(30)
overbought = input(70)

plot(ma1, title="RSI MA1", color=teal)
plot(ma2, title="RSI MA2", style=circles, color=orange)

obhist = ma1 >= overbought ? ma1 : overbought
oshist = ma1 <= oversold ? ma1 : oversold

plot(obhist, title="Overbought Highligth", style=histogram, color=maroon, histbase=overbought)
plot(oshist, title="Oversold Highligth", style=histogram, color=green, histbase=oversold)

i1 = hline(oversold, title="Oversold Level", color=green)
i2 = hline(overbought, title="Overbought Level", color=maroon)

fill(i1, i2, color=olive, transp=70)

hline(50, title="50 Level", color=black)