RicardoSantos

[RS]Double Helix RSI V0

Adapted from: Credit: gb50k

a great way to look at correlation and arbitrage.
開源腳本

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

免責聲明

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

想在圖表上使用此腳本?
//@version=2
study(title='[RS]Double Helix RSI V0', shorttitle='DH.RSI', overlay=false)
//  ||  Adapted from:   https://www.tradingview.com/script/kPbhW8mN-2symbol-RSI-crisscross/
//  ||  Credit: gb50k
src = input(title='RSI Source:', type=source, defval=close)
length = input(title='RSI Length:', type=integer, defval=10, minval=1)
smoothing = input(title='RSI Smoothing:', type=integer, defval=5, minval=1)
instrument0 = input(title='Base Instrument:', type=string, defval='EURUSD', confirm=false)
instrument1 = input(title='Mirror Instrument:', type=string, defval='USDOLLAR', confirm=false)

rsi0 = ema(security(instrument0, period, rsi(src,length)), smoothing)
rsi1 = ema(security(instrument1, period, rsi(src,length)), smoothing)

p0 = plot(title='RSI0', series=rsi0, color=black, linewidth=2)
p1 = plot(title='RSI1', series=rsi1, color=gray)
fill(title='b', plot1=p0, plot2=p1, color=black, transp=70)
plot(title='AVG', series=avg(rsi0, rsi1), color=red)
hline(0)
hline(25)
hline(75)
hline(100)