AleksanderThor

Check The Correlation

Dilihat 1269 kali
120
1269 4
Check the correlation of different assets on your preferred timeframe to find trends, patterns, new strategies or to minimize the exposure in correlated assets
Keluarkan daripada Skrip Pilihan Tambah kepada Skrip Pilihan
Hey, nice work. Can you send pinescript code for comparing XAUUSD and DXY? Thanks.
+1 Balas
Can I change the asset (es, XAUUSD, XAGUSD etc.)
Balas
AleksanderThor gianfranco60
@gianfranco60, Sure, just type the tickers in field instead of "EURUSD", "USOIL" etc. Otherwise if you want to check the correlation of only Gold and Silver while checking another asset you can use the following script:

study("Correlation")

res=input(defval="D",type=resolution, title="Timeframe")
length=input(defval=20,minval=2,type=integer,step=1, title = "Number of bars back")

Ticker1 = input("XAGUSD")
Ticker2 = input("XAUUSD")

T1=security(Ticker1, res, close)
T2=security(Ticker2, res, close)

cor=correlation(T1,T2,length)

plot(cor,color=blue,linewidth=1,transp=0)

hline(.80,linewidth=1)
hline(0.0,linewidth=1)
hline(-.80,linewidth=1)
Balas
beautiful script :-)
+4 Balas
Laman Utama Penyaring Saham Penyaring Forex Penyaring Kripto Kalendar Ekonomi Bagaimana ia berfungsi Ciri-ciri Carta Harga Peraturan Dalaman Moderator Laman web dan Penyelesaian Broker Widget Solusi pencartaan Dapatkan Bantuan Permintaan Ciri Blog & Berita Soalan Lazim Wiki Twitter
Profil Tetapan Profil Akaun dan Pengebilan Dapatkan Bantuan Idea-idea yang diterbitkan Pengikut Mengikut Mesej Peribadi Sembang Daftar Keluar