I don't think anyone has thought of making a correlation within a correlation to determine the risk. There are more successful ways of calculating risk that have been extensively tested for decades.
However, if you want to materialise the concept you are proposing, I would advise you to place an order in the Freelance section, as I have not found anything similar in the CodeBase and Market section.

- 2023.08.28
- www.mql5.com
In Forex, pairs are correlated or inversely correlated to each other on a spectrum, usually measured from -100 to 100.
Here is such a matrix of correlations: https://www.mataf.net/en/forex/tools/correlation
Has anyone made a utility or indicator that calculates the risk one should take on each currency pair given the other currency pairs in their portfolio?
For example, if one is considering entering a long trade into GBP/USD and already has a 1% risk long position in EUR/USD:
- If such a trader were to go long GBP/USD at 1% risk, and if their position in EUR/USD loses by stop-out, their GBP/USD position is likely to be stopped out as well since those 2 pairs are 90% positively correlated.
- Thus, such a risk management utility based on correlation could alert the trader before opening a GBP/USD position that they could incur 2% loses in the future.
As another example, if one is considering entering a long trade into USD/JPY and already has a 1% risk long position in EUR/USD:
- If such a trader were to go long USD/JPY at 1% risk, and if their position in EUR/USD loses by stop-out, their USD/JPY position is likely to hedge this loss since those 2 pairs are 90% inversely correlated.
- Thus, such a risk management utility based on correlation could tell the trader before opening a USD/JPY position that this is a safe trade since it could hedge potential losses in the future.
Heres a code entry for that for symbol to symbol , if it helps
https://www.mql5.com/en/code/19832
And a search term for the marketplace : https://www.mql5.com/en/search#!keyword=correlation%20table&module=mql5_module_market

I don't think anyone has thought of making a correlation within a correlation to determine the risk. There are more successful ways of calculating risk that have been extensively tested for decades.
However, if you want to materialise the concept you are proposing, I would advise you to place an order in the Freelance section, as I have not found anything similar in the CodeBase and Market section.
That is actually a real issue when using correlation that the OP has to consider . Excellent observation
(i) can go together either way, for a long time
(ii) change direction together
(ii) change direction apart (correlation flips to opposite) - becomes known after the fact.
Let alone TFs (what's positively correlated on higher TFs, can be negatively correlated on smaller TFs, and vice versa).
Key questions stay unanswered:
- what's the Signal to buy or sell.
- what's the advantage/profitable opportunity (after investing 2+ years in Pearson - I see none).
I made a simple tool in response to my post above, however my correlation matrix is showing different values than the competition (mataf, myfxbook, etc).
Can anyone with python experience chime in and please give suggestions?
https://github.com/kirillmcclintock/fx_correlation_risk_management

- kirillmcclintock
- github.com
I made a simple tool in response to my post above, however my correlation matrix is showing different values than the competition (mataf, myfxbook, etc).
Can anyone with python experience chime in and please give suggestions?
https://github.com/kirillmcclintock/fx_correlation_risk_management
different price feeds and different periods for checking would be my first guess
Highly correlated:
(i) can go together either way, for a long time
(ii) change direction together
(ii) change direction apart (correlation flips to opposite) - becomes known after the fact.
Let alone TFs (what's positively correlated on higher TFs, can be negatively correlated on smaller TFs, and vice versa).
Key questions stay unanswered:
- what's the Signal to buy or sell.
- what's the advantage/profitable opportunity (after investing 2+ years in Pearson - I see none).
the advantage being that it is possible to have more positions in your portfolio and use up more available margin, while keeping the risk of big loses to a minimum. For example, if you had 10 positions open at 1% risk each, your losses in the future could be kept at 5% or less if you take into account correlation.
Heres a code entry for that for symbol to symbol , if it helps
https://www.mql5.com/en/code/19832
And a search term for the marketplace : https://www.mql5.com/en/search#!keyword=correlation%20table&module=mql5_module_market
Also check this out https://www.mataf.net/en/forex/tools/correlation

- www.mataf.net
I've seen that but thank you .
You also have a further issue if you are deploying on mt4.
Your charts must load
I've seen that but thank you .
You also have a further issue if you are deploying on mt4.
Your charts must load
This tool would be used without Metatrader integration for now. Right now you have to manually add your current portfolio as it appears in metatrader. An example .csv sheet is in the Github. Whatever pairs you are thinking about trading but haven't yet can be entered into the .csv sheet as well.
Not a feature I'm going to implement until I can figure out why my correlation figures are different from others.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In Forex, pairs are correlated or inversely correlated to each other on a spectrum, usually measured from -100 to 100.
Here is such a matrix of correlations: https://www.mataf.net/en/forex/tools/correlation
Has anyone made a utility or indicator that calculates the risk one should take on each currency pair given the other currency pairs in their portfolio?
For example, if one is considering entering a long trade into GBP/USD and already has a 1% risk long position in EUR/USD:
As another example, if one is considering entering a long trade into USD/JPY and already has a 1% risk long position in EUR/USD: