49
All features indicated on the chart.
A simple higher period call of 5 period RSI that shows what we all know that OB/OS conditions are some of the best parts of a move.
color bars can be turned off. RSI can be shown in a traditional format with a smoothed line (current period). Trend bars can be turned on or off. Blank areas on the bottom line denote non OB/OS conditions on the higher time frame.
Not to be used as a signal generator per se, but does a good job in backtesting anyway. I would use this as a 'permission' signal more than anything, keeps you on the right side of the move, far more often than not.
Enjoy,
Trade responsibly
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
//@version=2
study("Trend V2.1", overlay=true)
tf = period=="1"?"3":period=="3"?"5":period=="5"?"15":period=="15"?"30":period=="30"?"45":
      period=="45"?"90":period=="60"?"120":period=="120"?"180":period=="180"?"240":period=="240"?"D":
      period=="D"?"W":period=="W"?"M":period=="M"?"3M":period
overlay = input(true, title="Show Trend Color?")
mode    = input(true, title="RSI mode?")
Period  = input(5, title="Length")
Period2 = input(3, title="Signal")
src     = input(close, title="Source", type=source)
rsi     = rsi(security(tickerid, tf, src, false), Period)
OB      = input(80)
OS      = input(20)
trend   = rsi>=OB?teal:rsi<=OS?maroon:na
trendid = rsi>=OB?1:rsi<=OS?-1:0
barcolor(overlay?trend:na, color=trend)
plotshape(overlay==false and trendid==1?trendid:na, style=shape.square, color=teal, location=location.bottom, transp=0)
plotshape(overlay==false and trendid==-1?trendid:na,style=shape.square, color=maroon,location=location.bottom, transp=0)
plot(overlay==false and mode?rsi(src,Period):na, color=black, transp=0)
plot(overlay==false and mode?sma(rsi(src,Period),Period2):na, color=maroon, transp=0)
plot(overlay==false and mode?OB:na, color=maroon, transp=0)
plot(overlay==false and mode?OS:na, color=teal, transp=0)