Unity Pro - MetaTrader 5 script | Gold EA download - MT4/MT5 resources

This is an expanded and improved version of Cluster Multi-Asset Indicator Unification . It shows simultaneous changes in the relative values of currencies, metals, and optionally other assets.
The new version differs from the original indicator in slightly changed formulas and added functionality.
The underlying algorithm can be described in the following way. Consider a minimalist example of a currency pair (EURUSD) and gold (XAUUSD).
At every moment, the market state (i.e. the current price or the opening price of a bar) is represented by an obvious relationship:
EUR/USD = EURUSD
XAU/USD = XAUUSD
The variables EUR, USD, and XAU are the pure "value" of the asset, while EURUSD and XAUUSD are constants (exchange rates or quotes).
To find the variables, we complement the system with another equation that limits the sum of the variables to units:
Euro+XAU+USD=1
Therefore, the indicator has the name "Unity (Pro)".
Here's the difference with Unity: although it uses sums of squares, it uses ordinary sums (no squares). Therefore, if the user selects the AbsoluteValues mode (see below), any pair of the indicator's lines will be associated with the corresponding exchange rate on each bar. For example, the value of EUR and the value of USD correspond to EURUSD (as a number). Note that this only gives the correct ratio when the moving average is off, i.e. PricePeriod is 1.
Simple substitution gives:
EURUSD*USD+GOLDUSD*USD+USD=1
Then USD can be calculated as:
USD = 1 / (1 + Euro USD + Gold USD)
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 — the number of variables, C(xi,x0) — the reference to the ith pair, including the corresponding variable. Note that the number of variables is one more than the number of instruments.
Eliminating squares and square roots improves indicator performance compared to Unity.
Since the coefficients C involved in the calculation are often very different quotes, in the indicator they are also multiplied by the size of the contract: this gives more or less comparable values (at least for one order). To see them "as is" in the indicator window, the AbsoluteValues input parameter should be set to true. By default false, the indicator calculates the increment of the variable:
yi = xi0 / xi1 - 1,
where xi0 and xi1 are the values on the last and previous bar respectively.
Here are screenshots of the "EURUSD,GBPUSD,USDCHF,USDJPY,AUDUSD,USDCAD,NZDUSD,XAUUSD" cluster in two instances of the indicator: with value and momentum (impulse):

The asset lines that make up the current chart working symbol (XAU and USD in this case) are shown as thick lines, the rest are thin lines.
The main input parameters of the indicator:
Possible strategies for trading with this indicator:
Attachment download
📎 unitypro.mq5 (12.03 KB)
📎 indarray.mqh (3.88 KB)
📎 hashmaptemplate.mqh (3.29 KB)
Source: MQL5 #26489
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •