Discussion of article "Creating a Multi-Currency Indicator, Using a Number of Intermediate Indicator Buffers" - page 2

 
m_a_sim:


"The dollar index is a value of type double calculated using a formula kindly provided to me by Neutron."

Why cite formulas and reference someone else's name? Does he have seven eyes in his head? It turns out that first you need to read the article, then ask the authors of the formulas? If he is the author, then give the link where he gets it.


The formula is taken from this thread https://www.mql5.com/ru/forum/109249.

This is the beginning of the discussion. I recommend you to read it.

There are other formulas for calculating currency indices. But I used this formula for the example, because the purpose was to show the possibility of working with multiple indicator arrays.

Since I do not use the indices themselves in drawing, but build classical oscillators on them, I believe that their appearance will not change much if you use a different formula for calculating the dollar.

Прошу помощи в решении системы 3-х уравнений с тремя неизвестными значениями - MQL4 форум
  • www.mql5.com
Прошу помощи в решении системы 3-х уравнений с тремя неизвестными значениями - MQL4 форум
 

Thanks Alexey,

Great job!!

Nicely written article and your source code is well structured and easy to read. 

I had a couple of "take-aways"  that I learned:

#1how to annotate input parameters to have a better "user" experience;

#2 how to create a "status" label for immediate feedback;

#3 how to integrate custom-coded indicators;

#4 synchronizing current bars;

...as well as  using a boat-load of buffers!!!

thx,

payne 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Chart Constants / Types of Chart Events
  • www.mql5.com
Standard Constants, Enumerations and Structures / Chart Constants / Types of Chart Events - Documentation on MQL5
 
I think the calculation for jpy is wrong, it should be taken into account that there will be fewer signs than for other currencies.
 
Prival:

But I do have one question.

The indicator hangs on a single chart. And if there was a history swap on this symbol, I can find out about it, prev_calculated will be reset to zero.

But how do I know that there was a history swap on other symbols or the data just came with a big delay?

This question is solved here .
 
alex_r:
I think the calculation for jpy is wrong, it should be taken into account that there are fewer signs there than for other currencies.
I repeat, I do not use the drawing of the index as such, but only build oscillators on them, which can be seen visually. so it is not so important where the "index price" is located, but its changes from bar to bar (increment). This indicator can clearly show the volatility of the currency in comparison with other currencies involved in calculations and constructions. Of all the majors according to this indicator we can say that GBP is the most volatile currency. This is especially shown in the"MACD from index" mode.
 
olyakish:
I repeat, I do not use drawing of the index as such, but only build oscillators on them, which can be seen clearly. therefore, it is not so important where the "index price" is located, but its changes from bar to bar (increment). This indicator can clearly show the volatility of the currency in comparison with other currencies involved in calculations and constructions. Of all the majors according to this indicator we can say that GBP is the most volatile currency. This is especially shown in the "MACD from index" mode.

With the display of jpy problems, with the type of indicator MACD (with other types, draws) :

and also the screenshot from your article :

just here EURUSD chart, but MACD of JPY index on all charts =0.

 
olyakish:


The formula is taken from this thread https://www.mql5.com/ru/forum/109249.

This is the beginning of the discussion. I recommend you to read it.

There are other formulas for calculating currency indices. But for the example I used this formula, because the purpose was to show the possibility of working with multiple indicator arrays.

Since I do not use the indices themselves in drawing, but build classical oscillators on them, I believe that their appearance will not change much if you use a different formula for calculating the dollar.

The situation described above arises precisely because of the incorrectness of this formula, because the price of 1 yen is incomparably small in relation to other currencies.

Pound quotes will be dominant here, and if oil is inserted, all other currencies will be lost.

 
BoraBo:

The situation described above arises precisely because of the incorrectness of this formula, because the price of 1 Yen is incomparably small in relation to other currencies.

The pound quotes will be dominant here, and if oil is inserted, all other currencies will be lost.

Yes, MACD is not the most successful solution, as it turned out, for building classical indicators on indices. We should have limited ourselves to indicators that can have values in a certain range (for example, 0-100), then there would not be such situations.

 

Great article!

I'm working on s.th. similar, calculating currency indexes for an arbitrary number of currencies and displaying their indexes relative to another.

My approach to make the indexes comparable is to compare the relative movements of each currency pairs and currency indexes.

The relative movement is calculated by the formula: log ((current_tick.ask + current_tick.bid) / (last_tick.ask + last_tick.bid))

when a currency pair XXXYYY goes up, it means XXX gains relative to YYY, then the quotient of the current price divided by the last price is greater than 1 and the log is positive.

when a currency pair XXXYYY goes down, it means XXX loses relative to YYY, then the quotient of the current price divided by the last price is smaller than 1 and the log is negative.

This way has the following advantage:

- the accumulated movements can easily be calculated as the sum of smaller movements, e.g. the up/down movement in a 1 minute bar is the sum of all the ticks movements within that bar.

- movements of currency pairs can be compared directly.

- currency movement indexes can be calculated as sums of currency pair movements.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
 
Could the author or someone else add to the presented indicator the same algorithm of calculation and drawing lines by MA, as it is done in the original indicator for MT4?
https://www.mql5.com/en/articles/1464.
Теоретические основы построения кластерных индикаторов для рынка FOREX
Теоретические основы построения кластерных индикаторов для рынка FOREX
  • 2007.04.06
  • Simeon Semenych
  • www.mql5.com
Кластерные индикаторы – это набор индикаторов, разделяющих валютные пары на отдельные валюты. Индикаторы позволяют следить за колебаниями валют относительно друг друга, определять потенциал зарождения новых валютных трендов, получать торговые сигналы и сопровождать среднесрочные и долгосрочные позиции.