CorrelationsSearcherLE is a “lite” free version of the CorrelationsSearcher Expert Advisor .
As the name implies, the Expert Advisor’s job is to find correlations between the price movements of various trading instruments available in the MT5 terminal. The only functional difference between the two versions of the Expert Advisor is that the full version works with all available trading instruments of the terminal, while the light version processes data for only 20 instruments.
- in the terminal, an Expert Advisor is attached to the chart window of any instrument (only the timeframe is important).;
- the necessary settings are selected (see the description below for the meaning and purpose);
- after the start, historical data is requested from the server for each instrument in turn; for instruments that meet a certain set of requirements (the ability to perform any trading operations, the minimum required depth of history), the correlation of price movements is checked (the correlation of each with each of the studied instruments is checked);
- the start of the processing process is indicated by a message in the “Experts” tab of the terminal;
- at the end of the calculations, the results are saved to a. csv file at the address in the Expert Advisor settings (by default, the path is: MetaTrader 5MQL5FilesCorrelationsSearcherLE), the successful saving of the file is confirmed by a message;
- the information in the file is grouped into seven columns (see the screenshot): in the first two, the names of the instruments are paired, then the numerical values of the correlation coefficient (Fechner) between the pairs of instruments for the entire study period and for each period of history (the entire study period of history is divided into four parts so that it is possible to track the dynamics of changes);
- each time the “new bar” event occurs, the data processing and file writing cycle repeats.
[spoiler title=”Read More…”]
Format for storing data in a file .The csv type is convenient for further processing and opens up a wide field for creativity and practical application.
- MinCorrelationCoefficient – the minimum threshold value of the correlation, the results obtained are less than the threshold value will not be output to the file;
- BARS – the depth of the history in bars (the timeframe corresponds to the chart to which the Expert Advisor is attached), used in calculations; in the case when the depth of the available history of any of the studied instruments is less than this value, the research will be carried out on the smallest of the trading histories;
- MMH-limit of the minimum history depth in months for the instruments under study. Symbols for which the available history is less than this value are eliminated at the initial stage and do not participate in further calculations.
Important:
- due to the specific features of the strategy tester, this Expert Advisor will not work in the tester;
- You can run only one copy of the Expert Advisor in one terminal, and there may also be a conflict with other Expert Advisors that use global variables in their work.
Important:
- due to the specific features of the strategy tester, this Expert Advisor will not work in the tester;
- You can run only one copy of the Expert Advisor in one terminal, and there may also be a conflict with other Expert Advisors that use global variables in their work.
[/spoiler]