Skip to content
All library documents

Speeding Cross-Pair Backtests with a Custom Profit-Currency Symbol

Article MQL5 code base

Summary

The document explains a MetaTrader 5 backtesting workaround for cross-pair instruments. During a test, the platform may load and synchronize an additional symbol to convert the main instrument’s profit currency into the account currency. The article argues that this conversion can add computation time, especially during optimization, even when exact currency conversion is not needed for the research question.

Its example creates a custom copy of the tested symbol, changes that copy’s profit currency to the account currency, enables it, and opens its chart. This removes the conversion step, so results are effectively expressed in pips. The approach is useful when comparing price movement or signals without needing account-currency P&L. It does not preserve realistic currency-converted profits, so it is unsuitable when conversion materially affects performance or risk assessment. The document provides a script example, but no timing benchmark or comparison of backtest results.

Key ideas

  • MetaTrader 5 may use an additional currency pair to convert cross-pair profits into the account currency during backtests.
  • Creating a custom symbol with profit currency set to the account currency can bypass that conversion work.
  • The resulting test expresses profit movement in pip terms rather than realistic converted account-currency returns.
  • This shortcut is most relevant when conversion is unnecessary to the research question, such as examining signals.
  • The document offers no measured speedup and the method does not model currency conversion effects.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.