DS24

Currency Correlation indicator for the major currencies

DS24 Aggiornato   
This Pine script creates a currency correlation graph with 6 correlations in a separate window below the main chart.
The indicator supports the following 8 currencies: AUD, CAD, CHF, EUR, GBP, JPY, NZD, USD
Correlations can be selected to be either related to the base or the counter currency (default is base). The length of the correlation can be chosen (default is 10).
Correlations are given for related currencies e.g. for all AUD pairs.
If Base currency is selected and e.g. AUDCAD is displayed in the main window, then the correlation window will compare AUDCAD to: AUDCHF, AUDEUR, AUDGBP, AUDJPY, AUDNZD, AUDUSD
If Counter currency is seleted and e.g. AUDCAD is displayed in the main window, then the correlation window will compare AUDCAD to: CHFCAD, EURCAD, GBPCAD, JPYCAD, NZDCAD, USDCAD
Many of the above currency pairs are not real pairs. But they are availabe in Pine script to enable e.g. correlation calculations.
The advantage is that e.g. the comparison between AUDCAD and EURAUD will give a positive correlation, if AUD is gaining in strenght and EUR and CAD are not changing in strenght.
Eventhough price is moving in the opposite direction the correlation is positive in the AUDCAD vs EURAUD example.


Note di rilascio:
This indicator is an update of my previously Currency Correlation indicator.
The update was necessary because of a change in Pine which resulted in some correlations to be calculated wrong.
More specific Pine is phasing out generic currency pairs like "USDJPY". Instead "FX_IDC:USDJPY" needs to be used.
I also moved the script from Pine version 3 to version 4.
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?