This script plots the correlation for two symbols as an oscillator: A correlation of 1 means that both values move in the same direction together. A correlation of -1 means that both values are perfectly negative correlated.
Parameter: Length of the Correlation The two symbols you want to calculate the correlation for Barcolor: Defines whether Bar-coloring is set on. The Number of bars lookback for anomaly: Say both are normally positively correlated it is an anomaly when the correlation turns negative and vica-versa.
Alerts: You can also set an Alert when an anomaly is detected.(blue dots on oscillator)
This has many use-cases:
For example VVIX and VIX are normally positive correlated.
When this turns negative, this can mean that we are on a turning point: --> VVIX is rising while VIX is falling, risk of future Volatility is increasing (Top) --> VIX is rising while VVIX is falling, risk of future Volatility is decreasing (Bottom)
Another use-case is just checking the correlation of stocks in your portfolio to diversify.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.