senpai

Spyfrat RSI Strategy

79
Spyfrat RSI 50 Strategy Pinescript
開源腳本

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

免責聲明

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

想在圖表上使用此腳本?
//Based on Larry Connors RSI-2 Strategy - Lower RSI
strategy(title="Spyfrat RSI Strategy", shorttitle="SpyfratRSI", overlay=false)
src = close, 

//RSI CODE
up = rma(max(change(src), 0), 30)
down = rma(-min(change(src), 0), 30)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

//Rule for RSI Color
col = rsi > 50?lime: rsi < 60?red : silver

plot(rsi, title="RSI", style=line, linewidth=2,color=col)
//plot(100, title="Upper Line 100",style=line, linewidth=3, color=aqua)
//plot(0, title="Lower Line 0",style=line, linewidth=3, color=aqua)

band1 = plot(70, title="Upper Line 70",style=line, linewidth=1, color=aqua)
band0 = plot(30, title="Lower Line 30",style=line, linewidth=1, color=aqua)
band2 = plot(50, title="Upper Line 50",style=line, linewidth=1, color=green)
fill(band1, band0, color=gray, transp=80)

//plot(long,"long",color=green,linewidth=1)
//plot(short,"short",color=red,linewidth=1)