Search This Blog


Indicators of correlation

Indicator korrellyatsii

Forex - indicator considers the correlation of currency pairs.

Input parameters:

 extern string  OtherChart = "EURUSD" ; extern string OtherChart = "EURUSD";
extern int n = 20 ; extern int n = 20;
extern bool UseOpen = true ; extern bool UseOpen = true;
extern bool UseClose = false ; extern bool UseClose = false;
extern bool UseHigh = false ; extern bool UseHigh = false;
extern bool UseLow = false ; extern bool UseLow = false;
extern int CalcBars = 400 ; extern int CalcBars = 400;
The formula for calculating:
Индикаторы Форекс Индикатор корелляции


Индикаторы Форекс Индикатор корелляции


Индикаторы Форекс Индикатор корелляции

The prices of two assets in the same timeframs. n - the period for which consider the correlation. x и y x and y with a dash on top - this is the mean value of x or y in the last n bars.

Example of USDCHF and EURUSD:

Indicators Forex Indicator korellyatsii

Download forex - LED korellyatsii

Forex indicator Corelation

The indicator is designed to find correlations between different tools. Allows you to superimpose one graph on top of another and visually identified as correlated between the different tools. Also allows you to overlay moving averages (Moving Average).

Input parameters:

  • simbol_name - ticker tool, the schedule of which will be imposed on the current.
  • bars_for_autoscale - the number of bars on which the graphics will be scaled (0 - maximum number)
  • inverse - turning upside-down schedule
  • MA - show or no moving average to overlay graphics (true - show; false - no)
  • MAPeriod - period moving average
  • MAOnly - only shows the moving average (hide schedule)

Scaling takes place in such a way that the maximum and minimum on the plot in the N-bars (the bars_for_autoscale) coincide.

The indicator can be used to hedge their risks and trading strategies for spredovyh correlating pairs.

Download forex indicator for metatrader Corelation

Indicator for Forex - L_Correlation

A calculation of correlation coefficient between two graphs, quotations currency pair (exchange rate between the pair, which is attached to the chart the indicator, and a pair specified in the options bar).

In the window display is shown:

  • Graph of correlation coefficient (you can turn off the display, as shown in the drawings)
  • Schedule moving average correlation coefficient of the curve (you can turn off the display)
  • The average value of correlation coefficient for the specified number of recent bars
  • Histogram of the values of correlation coefficient (distribution function)

Options bar

Mode = 0, 1, 2... - The parameter that determines to what it is setting the price schedule to calculate the correlation (0 - to the closing price of the bar, 1 - for the difference between the price and the closing price of the opening, 2 - for the price to the closing price of the maximum bar ... completely - see comment in the code indicator)

Pair = "USDCHF", "EURUSD"Currency pair that you want to calculate the correlation factor
ShowCorrelation = true - if you want to display the buffer coefficient of correlation, = false, if you do not need
ShowMA = true - if you want to display the buffer moving average correlation coefficient, = false, if you do not need
CorrelationRadius = 15 - the radius of correlation
MA_Period = 10 - period moving average
ResultingBars = 0 - number of bars on which the final average of the calculated correlation coefficient (the value displayed in the lower left corner). the average is considered for all values of correlation coefficient

FontName = "Verdana" - the font, which displays the mean value of coefficient. корреляции Correlation
FontSize = 10 - font size
FontColor = Black - font color


  • Now it is possible to calculate the autocorrelation (controlled parameter AutoCorrelation, setting AutoCorrelationShift - deflection). In this mode, the parameter is ignored Pair.
  • (EssentialLevel) extrema ratio (auto-) correlations, which exceed a preset level (EssentialLevel)

ShowEssentialPoints - The number of significant points to be displayed. it shows all the points, if =- 1, it does not appear

  • In the autocorrelation in the chart shows the area, which were essential factor

ShowEssentialRanges - Number of Borders significant intervals (vertical lines) to display. If = 0, then display the border, if =- 1, it does not appear

ShowEssentialRectangles - ShowEssentialRectangles - The number of significant areas (rectangles in the chart) to display. If = 0, it shows all the areas, if =- 1, it does not appear

  • Added the ability to automatically select parameters and CorrelationRadius AutoCorrelationShift depending on the time-frame (for this you need to install them with zeros)
  • New versions of the basic functions (ie, the possible value of the Mode). For more information, see the commentary to the code of an indicator.
  • In the final inscription shows two kinds of average value of coefficient. correlations: the first number - this is a maximum of the histogram and the second - this time with a moving average for the entire length of stories (or just under the last ResultingBars bars)
  • ShowSummary Display of final markings inc (off) Parameter ShowSummary

Download Forex Indicator L_Correlation

No comments: