I am hoping to find a way to find variance between 2 currency pairs. These currency pairs have long term high positive correlation(93%) but from time to time they develop an anomaly and one of the moves further away from the other, the correlation goes down and they develop variance/deviation/price gap. I know that in long term they join up and this price gap equalizes and they correlate again. Now the question, I need some formula(for excel preferably) that would calculate this variance in real time from live data that I have in excel.
I know that standard deviation is able to do this but it takes number of periods into account. I am rather looking for a way to draw this deviation without using any number of periods but live data because if set number periods is used then as time goes by the curve re-draws itself to adjust to the number of periods.. I would be very thankful if someone could help me.