Correlations revisited ... - page 3

 

You are right Sir. After playing with the MA correlations indicator, I am unable to find any meaningful trading signals. Thank you for satisfying my curiosity.

 

what is really interesting in this indicator, there is a correlation when there is a high volatility.

 
gafet:
what is really interesting in this indicator, there is a correlation when there is a high volatility.

gafet

It is because averages are compared (always bare in mind a lag of an average) and not price

 

- Pearson(linear) correlation

- Spearman's rank correlation

- and Kendall's tau

updated to be new metatrader 4 compatible : correlations_nmc.mq4

The dll does not need an update. Update was needed because the structure of the folders have been changed and the way how symbols are stored now. Use the dll from the first post of this thread to make the indicator work. All the rest (the very detailed description) is found on the first post too (no point in repeating all that is told there)

Files:
 

Common for all ...

Attached is an example indicator using correlations library made for this purpose.

_______________________________

Parameters :
Symbols-> Symbol(s) correlations to current symbol you want to be calculated

Length-> length of the correlation interval to use for computation

Price-> price to use (standard metatrader prices are :
0 - close

1 - open

2 - high

3 - low

4 - median (high+low)/2

5 - typical (high+low+close)/3

6 - weighted (high+low+close+close)/4

Type:
0 -> Pearson (linear) correlation
SubType:
0 -> the correlation itself

1 -> fisher transform of the correlation

2 -> Student's t
1 -> Kendall's tau
SubType:
0 -> the tau itself

1 -> fisher transform of the tau

2 -> Student's t

3 -> Kendall's tau as No of deviations
2 -> Spearman's rank correlation
SubType:
0 -> the rank itself

1 -> fisher transform of the rank

2 -> Student's t

3 -> square of differences of ranks

4 -> expectation of differences of ranks

5 -> deviations of differences ranks

colorFrom-> starting color for gradient when used on multiple symbols

colorMiddle-> middle color for gradient when used on multiple symbols

colorTo-> ending color for gradient when used on multiple symbols

linesWidth-> width of the line used to draw

_______________________________

As you can see, common sub-types for all are the first 3 :
0 -> is the correlation itself

1 -> is the fisher transform as a measure of significance (more details here : Fisher transformation - Wikipedia, the free encyclopedia )

2 -> Student's t for a correlation (more details here : Student's t-distribution - Wikipedia, the free encyclopedia )

This indicator needs to have dll imports enabled and it also needs the correlations.dll from the correlations.zip file extracted to experts/libraries folder of your metatrader folder

Updated version of the indicator (not the dll, the dll stays the same) posted here : https://www.mql5.com/en/forum/180028

Files:
 

Correlations - the version with USDX added as possible symbol to be used in symbols for correlations, updated to be new metatrader 4 compatible :

correlations_amp_usdx_nmc.mq4

usd_index.mq4

Original was posted here : https://www.mql5.com/en/forum/180028

 

San

USDX added as a symbol (so you can enter it in a symbols list) That way it is treated as any other symbol your broker allows and is supporting. Just enter "USDX" in the symbols list and it will be calculated first and then used in correlations calculations (like this example)

PS: in the lower sub-window it is the dollar index standalone indicator (attaching it too, in order to make visible all and to how what value of USDX is used in correlations) but it is not needed for the correlations indicator (it is doing that calculation internally, it does not need the "USD index" indicator to work)

Updated version posted here : https://www.mql5.com/en/forum/180028

regards

Mladen

Snowski:
Very interesting indeed.

One request: would love to see the USD Index added.

IMO, it would be an interesting study to compare any USD pair to the USD index that way, especially with the mutliple algorithms included in this gem.

Been looking at code, not sure how to add it myself.

USD Index = 50.14348112 * MathPow(eurusd,-0.576) * MathPow(usdjpy,0.136) * MathPow(gbpusd,-0.119) * MathPow(usdcad,0.091) * MathPow(usdsek,0.042) * MathPow(usdchf,0.036);

I think we may need another buffer, so perhaps drop one..?

Thanks in advance.

San.
 

Hi mladen,

I was just trying out what happens when you pre-smooth "correlations nmc.mq4" with your jurik filter(s) and it worked fine with the original one, but didn't work with the double smoothed one. It just returns a value of 1.0? Thanks in advance

 
beachboy44:
Hi mladen, I was just trying out what happens when you pre-smooth "correlations nmc.mq4" with your jurik filter(s) and it worked fine with the original one, but didn't work with the double smoothed one. It just returns a value of 1.0? Thanks in advance

beachboy44

You mean using double smoothed jurik instead of the raw price for correlation?

 

Yeah exactly

Reason: