This is an extended and improved version of cluster multi-asset indicator Unity. It shows synchronous changes in relative values of currencies, metals and optionally other assets.
The new version differs from the original indicator by slightly changed formula and added features.
The underlying algorithm can be described in the following way. Consider it on the minimalistic example with one currency pair (EURUSD) and gold (XAUUSD).
At every moment, the market state (that is current prices, or open prices of the bars) is expressed by obvious relations:
EUR / USD = EURUSD
XAU / USD = XAUUSD
where variables EUR, USD, XAU are pure "values" of the assets, and EURUSD, XAUUSD are constants (exchange rates, or quotes).
To find the variables, we supplement the system with another equation, limiting the sum of the variables to unity:
EUR + XAU + USD = 1
Hence the name of the indicator — Unity (Pro).
And here is the difference from Unity: while that used the sum of squares, this uses plain sum (no squares). As a result, if a user selects the mode AbsoluteValues (see below), any pair of lines of the indicator is related as corresponding exchange rate on every bar. For example, a value of EUR and a value of USD conforms to EURUSD (as a number). Please, note, this only gives proper ratio when moving averaging is off, that is PricePeriod is 1.
Simple substitution gives:
EURUSD * USD + XAUUSD * USD + USD = 1
Then USD can be found as:
USD = 1 / (1 + EURUSD + XAUUSD)
and all other variables can be calculated.
x0 = 1 / (1 + sum(C(xi, x0))), i = 1..n
xi = C(xi, x0) * x0, i = 1..n
where n — number of variables, C(xi,x0) — the quote of i-th pair including corresponding variables. Please note, that the number of variables is 1 more than instruments.
Elimination of squares and square roots improved indicator performance in comparison to Unity.
Since the coefficients C involved in the calculations are quotes that are usually very different, in the indicator they are additionally multiplied by contract's sizes: this gives more or less comparable values (at least, of one order). To see them "as is" in the indicator window there is an AbsoluteValues input parameter that should be set to true. By default, it is false, and the indicator calculates the increments of variables:
yi = xi0 / xi1 - 1,
where xi0 and xi1 are values on the last and the previous bars respectively.
Here is a screenshot for the cluster "EURUSD,GBPUSD,USDCHF,USDJPY,AUDUSD,USDCAD,NZDUSD,XAUUSD" in two instances of the indicator: with values and momentum (impulse):
The lines of assets that make up work symbol of the current chart (in this case, XAU and USD) are shown thick, the rest are thin.
The main input parameters of the indicator:
Possible strategies to trade using this indicator:
Range BreakOut EA. The range is defined by the min number of bars and max width in pips. This expert advisor is designed with visual strategy builder - Mission Automate. Code is generated automatically. More info: https://www.mql5.com/en/articles/4951Reversing Grid on Limit orders
Grid system with limit orders. This expert advisor is designed with visual strategy builder - Mission Automate. Code is generated automatically. More info: https://www.mql5.com/en/articles/4951