Indicators: Correlation

 

Correlation:

Correlation of two symbols. Values are oscillating between +1 (complete positive correlation) and -1 (complete negative correlation). Correlation value 0 is denoting absence of correlation (random changes without correlated price changes between the two observed symbols).


Usage

  • Use the correlation period to calculate either longer term correlation using longer period (good for observing if the symbols that are monitored are tending to trend in the same direction) or using short period (good for sudden price changes observation - usually when news are issued for one symbol and not for the other).
  • Enter in either or both of the symbol parameters the symbol you wish to monitor.
  • If the symbol parameter is left empty, current chart symbol will be used.
  • Set the coloring mode (two color mode is displaying different colors when zero value - no correlation level - is crossed).

Author: Mladen Rakic

 

Hello Mladen,

Do you think it is possible that this correlation indicator to be transformed into an EA?

For example,when EURUSD and GBPUSD become strongly decorrelated on H4, the EA to initiate a BUY trade on EURGBP with a TP and a SL.


thank you very much

 

Hello Mladen Rakic

When I try to use your indicator, I always get a blank response. Do you know what may causing it?

When I use the correlation between the same symbol, I get the correct response (1)..

I don't understand why it is not working.. your code looks good!


If you are reading this, thanks for the consideration!

See ya!

Reason: