DS24

Currency Correlation indicator for the major currencies

DS24 Atualizado   
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 Lançamento:
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 aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?