Sign up with our partner broker and get free XAU/USD signals. JOIN US
LIVE MT5 BUILD 5830 LAST REV 2026-05-23
SESSION -- UTC --:--
SESSIONS
SYDNEY22:00–07:00 UTC
TOKYO00:00–09:00 UTC
LONDON07:00–16:00 UTC
NEW YORK12:00–21:00 UTC

Custom symbol creation and synthetic instruments on MT5

Build your own composite symbol from existing instruments, import external tick data, and test correlations or non-tradeable indices. The custom symbol feature is one of MT5's most powerful and least-used.

PUBLISHED 2026-05-23 READING TIME 7 MIN MT5 BUILD 5830 CATEGORY PLATFORM
Key points:
  • MT5 lets you create custom symbols with their own price history, contract specs, and chart behaviour.
  • Custom symbols are local to your terminal. They do not trade on any broker. Use them for analysis, backtesting, and visualisation.
  • You can import bar or tick data from CSV files, build composite symbols from existing instruments, or generate synthetic series.
  • Strategy Tester can backtest EAs and indicators on custom symbols, giving you a way to test on data your broker does not offer.

1. Why custom symbols exist

Your broker offers a fixed set of tradeable instruments. But there are cases where you want a chart of something your broker does not list:

  • A composite "EUR basket" averaging EUR/USD, EUR/GBP, EUR/JPY
  • A spread instrument like XAU minus XAG (gold-silver ratio)
  • Tick data from a different broker, imported for cross-broker analysis
  • A non-tradeable index like a custom equal-weighted basket
  • Higher-resolution historical data for backtesting (your broker may only store 60 days of tick history)

Custom symbols let you build any of these without leaving MT5.

2. Opening the Symbols dialog

Press Ctrl+U or right-click in market watch then choose Symbols. At the bottom of the dialog you will see a button labelled Custom Symbol. Click it.

From here you can:

  • Create: build a new custom symbol from scratch
  • Edit: modify an existing custom symbol's specs
  • Import bars: load OHLC data from CSV
  • Import ticks: load tick-by-tick data from CSV
  • Export bars / ticks: dump existing data to CSV (useful for any symbol, not just custom)

3. Creating a basic custom symbol

Click Create. You get a form with all the contract specifications you would see for a real symbol.

FieldNotes
SymbolInternal name. Avoid spaces and special characters. Example: EURBASKET.
DescriptionHuman-readable label. Example: "EUR basket (equal weight)".
International nameOptional ISIN or similar identifier.
CategoryGroup in market watch (e.g. Custom Indices).
Trade modeSet to Disabled. Custom symbols cannot be traded.
DigitsPrice precision. 5 for forex-style, 2 for index-style.
Contract sizeArbitrary for non-tradeable symbols. Use 1.
Tick value / tick sizeSet so that 1 tick of price change equals 1 unit of value if you do not care.

Most of the specification fields do not matter for a custom symbol you only want to chart. Set Trade Mode to Disabled and the rest is cosmetic.

4. Composite symbols (formula-based)

The most powerful custom symbol feature: you can specify a price formula that references other symbols. MT5 then automatically calculates the custom symbol's price tick-by-tick.

The formula syntax

In the custom symbol's Formula field (under Advanced specifications), enter an expression. Examples:

GoalFormula
Inverse of EURUSD1 / EURUSD
EUR basket (3 pairs avg)(EURUSD + EURGBP * 1.27 + EURJPY / 154) / 3
Gold/silver ratioXAUUSD / XAGUSD
Net long position proxyEURUSD - GBPUSD
Volatility proxy(USDCHF + USDJPY / 100 + DXY / 100) / 3

The formula uses MT5's expression parser. Operators: + - * / ( ) and a small set of functions (abs, max, min). It references other symbol names as variables, using the latest tick.

Once a formula is set, the custom symbol updates in real time as the underlying symbols tick.

5. Importing OHLC data from CSV

If you have historical data from another source (an external broker, a data vendor, a research dataset), you can import it into a custom symbol.

CSV format

MT5 expects this CSV layout, no header row:

2025.01.15,09:00:00,1.0834,1.0840,1.0830,1.0838,12345
2025.01.15,09:01:00,1.0838,1.0842,1.0836,1.0841,8721
2025.01.15,09:02:00,1.0841,1.0845,1.0840,1.0843,15432

Columns: date, time, open, high, low, close, tick volume. Date format YYYY.MM.DD, time HH:MM:SS.

Import steps

  1. Create the custom symbol (Custom Symbol > Create).
  2. Click Bars in the bottom toolbar.
  3. Click Import from File.
  4. Select your CSV.
  5. Confirm the time frame (M1, M5, H1, etc.) - the bars in the CSV must all be the same timeframe.
  6. Click Import.

Once imported, open a chart of the symbol and it will display the imported history.

6. Importing tick data

For Strategy Tester accuracy, importing tick-by-tick data is far better than OHLC bars. Tick data lets the Tester replay every price movement, including intra-bar fluctuations.

Tick CSV format

2025.01.15 09:00:00.123,1.08340,1.08342
2025.01.15 09:00:00.456,1.08341,1.08343
2025.01.15 09:00:00.789,1.08340,1.08342

Columns: datetime (with milliseconds), bid, ask. Optional fourth column for volume.

Where to get tick data

  • Your broker's history server: Tools > History Centre to export existing symbols.
  • Dukascopy: free historical tick data download for major forex pairs. CSV format may need conversion.
  • Tickdata vendors: paid sources with deeper history and more instruments.

7. Strategy Tester on custom symbols

Custom symbols appear in the Strategy Tester's symbol dropdown. You can backtest an EA or indicator against your imported history exactly as you would on a real symbol.

This is the key reason custom symbols matter for serious backtesting:

  • Test EAs on dates beyond your broker's tick history
  • Test across multiple brokers' historical data without changing accounts
  • Test on synthetic instruments to validate strategy robustness
  • Test on non-tradeable indices to develop ideas before finding a broker offering similar exposure

8. Real example: gold/silver ratio chart

Let us build a tradeable analysis of the gold/silver ratio (XAU/XAG), useful for precious metals traders.

  1. Press Ctrl+U, click Custom Symbol > Create.
  2. Symbol: XAUXAG. Description: "Gold/Silver Ratio".
  3. Category: Custom Ratios.
  4. Trade mode: Disabled.
  5. Digits: 4.
  6. Under Advanced, set Formula: XAUUSD / XAGUSD.
  7. Save.

Now drag XAUXAG from the Symbols panel to market watch, then open a chart. The chart updates live as gold and silver tick. The ratio is in the range of approximately 75 to 95 historically and indicates relative valuation between the two metals.

9. Limitations to be aware of

Historical data is forward-only

If you create a formula-based composite symbol today, MT5 has no historical data for it yet. The chart will start with today's tick and build history from there. To backfill historical data, you need to import OHLC or tick data from CSV.

Custom symbols are local to your terminal

If you reinstall MT5 or move to another computer, custom symbols do not transfer automatically. They are stored in the MQL5\Symbols folder under your terminal data directory. Back this folder up if your custom symbols are important.

You cannot trade custom symbols

Even if you mark trade mode as Full, there is no exchange behind a custom symbol. You can place orders in MT5, but they will simply error out. Use custom symbols for analysis, not execution.

FAQ

Can I use custom symbols in EAs?

Yes, in iCustom() calls and SymbolInfo() functions. Make sure the custom symbol exists in market watch before running the EA.

How much data can I import?

There is no hard limit but MT5 performance degrades with extremely large datasets (multi-gigabyte tick files). For most backtests, 5-10 years of tick data per symbol is the practical sweet spot.

Why does my formula return an error?

Check that all referenced symbols are in your market watch. The formula parser cannot reference unsubscribed symbols. Also confirm there is no division by zero possible at any tick combination.

Can custom symbols update in real time?

Formula-based custom symbols update on every tick of their underlying symbols. Imported-data custom symbols are static and do not update unless you import additional data.