Synergy

This indicator was developed for use in an investigation/tutorial using Pine Script to analyse Gold and US Dollar Index correlation.

The first indicator shall measure the percentage change between the open and close of each bar and compare it to the same percentage change of an alternative asset. Additionally, we shall color the background when the two assets move in the same direction. This should allow us to more easily see when the two assets move together and spot trends in their moment.

The yellow bars show use the percentage change in the price of gold. The blue bars show the percentage change in the price of the US Dollar index. If the bar is above zero, it means that the asset closed up. Conversely, if it is below zero, it means the asset closed down. Finally, the grey bars show bars in which the two assets closed in the same direction.

It can be used in conjunction with a second indicator (to be published soon) that provides statistics generated from this indicator.

The full free post can be found here: https://backtest-rookies.com/2018/12/21/gold-correlation-strategies-change-indicator-and-analysis/



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 ?