How to find similarity of two series over time containing periodic trends? Considering the data is received from a streaming source each second.How to distinguish if both the line graphs 'look' same/different in real time, statically, like the picture given below



Edit: 
1.Not sure if there is something as real-time  periodic correlation mechanism then cross-correlation would perhaps be an ideal solution ? 
2. Comparing slope of the two Line is the last option I would go with.
3. If statistically there is no way to solve this then I would look at machine learning to solve this
Maybe it is a huge oversimplification, but you can try: What if you do just arithmetic difference between the two signals (or divide one signal to another one) and look at the result?

I would expect that you will have spikes where signals become very different and you can make a threshold to find where they are on time.