From our archives, here is another important and missed code which I couldn't find on our forum. The Correlation RSI To Price by Mladen.

As explained by Mladen:

These indicators are a part of a test and might be useful in a couple of things. Original idea came from metastock (I saw in their "formula primer" that they gave an example of correlating macd to price) This one is what is closest to their correlation (and Tradestations correlation) and is putting macd and a chosen price into correlation. The nature of this correlation demands smoothing (result smoothing by all means - set PosCorrSmoothPeriod to 0 and you will see what I mean), and I decided not to use the simple moving average used by metastock in their version but to use Jurik smooth.

Immediately a "stronger version" : instead of using the correlation used in the previous, this one uses Pearson correlation. The interesting thing is that it is obvious that without smoothing the correlation is rather poor (just see the comparison : upper is without price smoothing, lower is with a 5 period price smoothing).

PS: Correlation MACD To Price version can be found

here.