OPEN-SOURCE SCRIPT

Market Correlation Analysis

Market Correlation Analysis is an indicator that measures the correlation of any two instruments.

To express price changes in a way that is comparable, this indicator uses a percentage of the ATR as a unit.

User Inputs:

Other Symbol - the symbol which we want to compare with the symbol of the main chart.

ATR for Price Movement Normalisation - I recommend high values to get the ATR more stable across time - if the ATR drastically changes, the indicator will register that as a price movement, because the unit in which price movements are measured itself changed by a lot. However, with higher values the ATR is stable and, in my opinion, more reliable than simply a percentage change of the current price.

Correlation Length - this is the number of bars for which the correlation coefficient will be calculated.

About The Indicator:

Market Correlation Analysis expresses the price changes of both instruments in question on the same histogram.
By default, the price changes that represent the instrument of the main chart are expressed with thinner bars of stronger colour, while the price changes that represent the other instrument are expressed with much thicker bars, which are of more pale colour.
The correlation coefficient is not expressed on the histogram, as it has a different scale. Therefore, it is only showed as a number.

I hope this indicator can make it easier to understand just how much two instruments have been similar to one another over a certain period of time. The possibility to see the correlation for any given time frame can give information that very specific to any trading style.
statistics

Open-source Skript

Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun das Script auch andere Trader verstehen und prüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?

Haftungsausschluss