Summary: A practical walkthrough of creating a custom symbol in MetaTrader 5, importing CSV price data, and using it for strategy backtesting. Includes official documentation references and real-world use cases.




Most traders I know just open up MT5, pick a symbol from their broker's list, and start backtesting. They never even look at the "Custom" section in the Symbols window. Big mistake.

I found this out the hard way a couple of months ago. A client sent me a strategy he wanted me to optimize – but it was based on a Chinese index that his broker didn't offer. No data, no chart, no backtest. I was stuck.

Then I remembered stumbling across something in the MT5 help files a while back about creating your own instruments. Turned out to be a lifesaver.

What are custom symbols anyway?



In plain English, a custom symbol is a financial instrument you create yourself inside MT5. Your broker doesn't provide it – you define it. You can import your own price history from a CSV file, set up trading sessions, and use it for technical analysis and backtesting.

The official MetaTrader 5 documentation says: "You can view charts of these symbols and perform technical analysis, as well as use them in the Strategy Tester to test Expert Advisors and indicators". That's exactly what I needed.

The real reason you should care about this



Here's the thing – most people think backtesting is limited to whatever symbols their broker feeds them. But what if you want to test a strategy on:

  • A stock that your broker doesn't list

  • A crypto index with custom data

  • A synthetic instrument you built yourself

  • Historical data from a different source that has better tick quality


  • The custom symbol feature solves all of that. According to the MQL5 documentation, "If your broker does not provide the symbol you want to test strategies on, or provides insufficient historical depth and price history quality, you can create a custom symbol and upload the required data to it".

    Step 1: Creating the custom symbol



    To create a custom symbol in MT5, open the Market Watch window, right-click anywhere, and select "Symbols". In the Symbols window, switch to the "Custom" tab (it's at the bottom of the list). Click "Create custom symbol".

    The configuration window has a bunch of settings, but here's what you actually need to care about:

  • Symbol name – Must be unique and only use Latin letters, dots, underscores, ampersands, and hashes. No spaces, no punctuation. I usually add a suffix like .cust or .my to avoid conflicts with broker symbols.

  • Description – Whatever you want, helps you identify it later.

  • Path – Where it lives in the folder structure. I keep mine under Custom\Forex\ or Custom\Indices\.


  • There's also a handy trick – you can copy settings from an existing symbol using the "Copy from" field. This saves you from manually entering all the trading hours and margin settings.

    Step 2: Importing price data



    This is where the magic happens. Once the symbol is created, go to the "Bars" tab (for OHLC data) or "Ticks" tab (for tick data) and click "Import".

    The data format is critical:

    For 1-minute bars (the most common):
    ``
    `

    For ticks:
    `
    `

    The key things to remember:
  • The platform stores all data as 1-minute bars internally – other timeframes are built from those

  • If you import a file with data that overlaps existing history, the new data completely replaces the old data for that time period

  • No duplicate timestamps – only one bar can exist per minute

  • Values less than or equal to zero are ignored

  • The data must be sorted from oldest to newest


  • Step 3: The thing nobody tells you about editing history



    Here's a piece of advice I learned by nearly pulling my hair out. If you want to manually edit price data, always request M1 timeframe data first. The platform stores everything as 1-minute bars, and if you edit an M5 bar, it actually changes five 1-minute bars behind the scenes.

    When you edit, the platform color-codes your changes:
  • Green background = correctly modified entries

  • Red background = errors (like High < Low)

  • Grey background = deleted entries

  • Yellow background = added entries


  • I always use this editing feature to fix bad tick data from external providers. Takes a few minutes but saves hours of backtest garbage.

    Step 4: Using custom symbols in Strategy Tester



    Once your symbol is set up with data, using it in the Strategy Tester is straightforward. The symbol will appear in the symbol dropdown just like any broker-provided instrument.

    One thing I didn't realize at first – the tester automatically handles currency conversions. If your symbol's profit currency is EUR and your account currency is USD, the tester will use cross rates like EURUSD for conversion.

    But there's a catch. The tester searches for conversion symbols in a specific order:
  • It looks for custom symbols first (e.g., AUDUSD.custom)

  • If not found, it falls back to standard symbols (e.g., AUDUSD)


  • This is actually really useful. If your broker quotes EURUSD with a weird suffix like
    EURUSD.f, the tester won't find it unless you tell it. So I create a custom EURUSD symbol with the correct suffix mapping to handle this.

    A real-world example



    Last month I needed to backtest a mean-reversion strategy on a Chinese stock index that isn't available on most brokers. I exported the index data from a financial data provider, formatted it into the MT5 CSV template, imported it as
    CN_INDEX.cust`, and ran my backtest. Took about 20 minutes total setup. The strategy performed differently than I expected – and I caught it before recommending it to the client, not after.

    Without custom symbols, I would have either used a proxy instrument (which gives flawed results) or told the client "sorry, can't test this." Neither is a good answer.

    Reference: MetaTrader 5 Help – Advanced User Options: Custom Instruments (metatrader5.com), MQL5.com – MQL5 Guide: Custom Symbols (mql5.com).

    This article is originally published on FXEAR.com, original content, reproduction without authorization is prohibited.