DS24

Currency Correlation indicator for the major currencies

DS24 Mis à jour   
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.


Notes de version:
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

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?