The math for such correlation is :
(from wiki)
So, if there is some inverse correlation for those two instruments say for the last 3000 periods, it would show as -.89 for the current bar, as it compares the prices of those two instruments.
Not asking anyone to code this for me, but could someone point me in the right direction--where to start?
Comment