DS24

Currency Correlation indicator for the major currencies

DS24 Actualizado   
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.


Notas de prensa:
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 de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?