Loading…

Synthetic Cross Builder

Some crosses simply are not offered by a given broker even though both of their component legs are - a EURJPY chart is unavailable, but EURUSD and USDJPY both exist and their product IS the EURJPY rate. This indicator builds that synthetic rate from two symbols you choose and a combine mode (multiply or divide), and draws it as a candle series in its own subwindow so it reads exactly like an ordinary chart. Synthetic Open and Close are taken directly from each leg's own Open/Close, since both legs' bar boundaries are effectively simultaneous on the same broker feed and timeframe. High and Low use the mathematically exact envelope instead of trying to guess a real intrabar path: for two positive prices, a product is maximised when both factors are simultaneously at their own high and minimised when both are at their own low, and a quotient is maximised at numerator-high over denominator-low and minimised at numerator-low over denominator-high. That is the tightest bound bar data alone can prove - it does not claim to know exactly when within the bar each leg's own extreme actually occurred, which no bar-level data can tell you. The candles themselves are drawn as chart objects (a wick line plus a body rectangle per bar) rather than as a native candle plot, on both platforms - identical rendering approach in both versions so the two outputs match pixel-for-pixel logic, not just concept. Only the most recent InpBarsToDraw bars are rendered as objects; the subwindow's own price scale is still driven by the full synthetic high/low series so the visible candles are always correctly scaled. Notes and limitations - Both legs are read at the same chart bar shift index, which assumes they share the chart's timeframe and closely aligned session hours - accurate for most forex pairs on the same broker feed. - High and Low are a mathematically exact bound given each leg's own High/Low, not a reconstruction of the true synthetic tick path - genuine synthetic wicks can only be built from tick-level data, which bar history does not retain. - Only the last InpBarsToDraw bars are ever drawn as objects; older history scrolls off and its objects are removed to keep the chart responsive, rather than accumulating without limit. - Candles are chart objects, not an indicator plot, so they do not appear in the Data Window and cannot be referenced by iCustom() from another program - use the underlying two symbols directly if a script or EA needs the synthetic values. - Fully causal: every closed bar's OHLC is computed once and does not change on a later tick; only the still-forming bar updates.

Indicator · MT5 · v1.0 · Free

About Synthetic Cross Builder

Synthetic Cross Builder is an indicator for MetaTrader 5. It has 7 settings, such as Leg a symbol, Leg b symbol and Mode. MQL source code included.

Files in the download: SyntheticCrossBuilder.ex5, SyntheticCrossBuilder.mq5, SyntheticCrossBuilder.txt.

Settings

SettingDefaultWhat it does
Leg a symbolEURUSDFirst leg symbol
Leg b symbolUSDJPYSecond leg symbol
ModeCROSS_MULTIPLYHow the two legs combine
Symbol suffixBroker suffix appended to both legs, leave blank if none
Bars to draw150How many recent bars are rendered as candle objects
Bull colorclrForestGreenBody colour when close >= open
Bear colorclrCrimsonBody colour when close < open

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: EURUSD · USDJPY · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria