Unity: Cluster Multi-Currency Indicator

Unity: Cluster Multi-Currency Indicator
Download ALL MT5 indicators (6132)
YouTube Video Thumbnail



Similar MetaTrader Tools

Unity: Cluster Multi-Currency Indicator

Info

The Unity: Cluster Multi-Currency Indicator is a Indicator for MetaTrader 5 that unity is a cluster multi-currency indicator that displays synchronized changes in the values of metals and major currencies in a generalized format. The core of its operation is based on a mathematical algorithm.

Usage

This tool is typically used for enhancing chart analysis and decision making.

Platform

This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.


How to Install and Use Unity: Cluster Multi-Currency Indicator

1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.

2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.

3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.

4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.

Frequently Asked Questions

Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."

Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).

Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.

What this tool does

Unity is a cluster multi-currency indicator that displays synchronized changes in the values of metals and major currencies in a generalized format.

Typical Use Case

This Indicator excels in automated trading and technical analysis on MetaTrader 5.

Compatible Platform & Setup

This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.

Description & Settings

Related: JONY ISLAM EMA Cluster Signals with Entry SL TP MTF Panel - another powerful indicator for MetaTrader 5 traders.

Unity is a cluster multi-currency indicator that displays synchronized changes in the values of metals and major currencies in a generalized format.

Also recommended: k-means machine learning for liquidity clusters - similar indicator with strong performance on MetaTrader 5.


The core of its operation is based on a mathematical algorithm. Consider a simplified example with one currency pair (EURUSD) and gold (XAUUSD).

At any given moment, the market state (represented by current or open prices of bars) can be expressed by the following formulas:
EUR / USD = EURUSD
XAU / USD = XAUUSD

Here, EUR, USD, and XAU represent the fundamental 'values' of the assets, while EURUSD and XAUUSD are the observed exchange rates or quotes.

To determine these underlying values, we supplement the system with an additional equation that normalizes the sum of the squares of the variables to unity:
EUR*EUR + USD*USD + XAU*XAU = 1

This normalization principle gives the indicator its name: Unity.

Through simple substitution, we can derive:
EURUSD*USD*EURUSD*USD + USD*USD + XAUUSD*USD*XAUUSD*USD = 1

From this, USD can be isolated as:
USD = sqrt(1 / (1 + EURUSD*EURUSD + XAUUSD*XAUUSD))

Once USD is determined, all other variables can be calculated.

In a general form, this can be represented as:
x0 = sqrt(1 / (1 + sum(c(xi, x0)**2))), i = 1..n
xi = c(xi, x0) * x0, i = 1..n

Where 'n' is the number of variables, and 'c(xi, x0)' is the quote of the i-th pair involving the corresponding variables. It is important to note that the number of variables is one more than the number of instruments.

Since the coefficients 'c' used in the calculation are often quotes with significantly different magnitudes, the indicator scales them by the contract sizes. This ensures that the resulting values are roughly comparable, at least in terms of their order of magnitude.

For informational purposes, the 'absolutevalues' input parameter can be set to true to display these scaled values in the indicator window. By default, this parameter is false, and the indicator calculates the percentage change (increments) of the variables:
yi = xi0 / xi1 - 1

Where xi0 and xi1 are the values on the last and previous bars, respectively.

The indicator visualizes a cluster of related assets. For example, a cluster might include EURUSD, GBPUSD, USDCHF, USDJPY, AUDUSD, USDCAD, NZDUSD, and XAUUSD. In the indicator window, the lines representing the assets that constitute the symbol of the current chart (e.g., XAU and USD for XAUUSD) are displayed with a thicker line, while other assets are shown with a thinner line.

Key input parameters for the Unity indicator include:

- instruments: A comma-separated string of trading symbols. All instruments must share a common currency, either as the base or quoting currency.

- barlimit: The number of bars to use for calculations.

- draw: Specifies the drawing style for the indicator.

- pricetype: The type of price to be used in the calculations (e.g., Open, Close, High, Low).

- savetofile: An optional parameter. If set, the indicator exports calculated values to a CSV file for external analysis, such as with a neural network. The file structure consists of the date in the first column, followed by the values of the corresponding indicator buffers. The structure of the file is as follows: the first column is the date, all subsequent ones are the values of the corresponding indicator buffers.

- shiftlastbuffer: An optional flag to modify how the CSV file is generated. When false, data for the same bar is saved on each line, with columns for dates and the calculated values of the instruments (divided into components). Column names correspond to currencies and metals. When true, an additional 'forecast' column is created, which contains the values from the last asset's column shifted forward by one bar. This allows each row to include the current bar's data along with the next bar's value for the last variable, useful for forecasting algorithms.

Recommended timeframes for using the Unity indicator are Daily (D1) and higher.

You may also like: DI Cluster Indicator for MT4/MT5 - excellent alternative for indicator users on MetaTrader 5.

Source Code

#property copyright "robotfx"
#property link "https://robotfx.org"
#property version   "1.0"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#define buf_num 15
#property indicator_separate_window
#property indicator_buffers buf_num
#property indicator_plots buf_num
#property indicator_color1 green
#property indicator_color2 darkblue

.......

Leave your opinion, ask a question, share some knowledge

⚠ Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.