Another_Symbol - MetaTrader 4 Script | Forex Indicator Download - MT4/MT5 Resources



In some cases, it is necessary to display quotes or time frames of another financial instrument (hereinafter referred to as "ticker") within the window of the current chart. An example of this necessity: looking for divergences between the quote charts of two instruments.
There are several options for the solution to this problem, including charts showing different symbols. However, in this case it will be limited to showing a simple line, which is one of the four characteristics of a candlestick for another symbol: open, close, high or low.
The Another_Symbol indicator displays data of another symbol in a subwindow of the current chart. The symbol name is specified in the "Symbol" parameter. In addition, it is possible to specify the desired time frame ("Chart Period" parameter) and the price of one of the candles ("Price" parameter). To extend the functionality, the "Price" parameter contains options for calculating the average price (Median), typical price (Typical) and weighted price (Weighted Close) of the candles.
A simple example of indicator operation - display of the closing price of the GBPUSD symbol on the chart of the EURUSD symbol.

The simplicity of this indicator lies in the fact that it does not synchronize the chart. Data is output by bar index, not by time. That is, if any bar of the current chart does not have a corresponding bar of another symbol, the data of the adjacent (earlier or later) bar will be displayed. This issue is not relevant to higher timeframes, as such bar gaps are rare. But on lower timeframes, especially on chart periods like M1, the time lag can be significant.

The result of this difference is that the true appearance of the quote charts of other trading symbols is distorted. Therefore, this version of the indicator is more suitable for timeframes where there are almost no bar gaps: M30 or higher.
The other side of the coin is the advantage: it is possible to display an M15 or even an M5 chart on an H1 chart.

Attachment download
📎 another_symbol_ad.mq4 (12.16 KB)
Source: MQL5 #14479
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •