Overwriting Symbol Specifications in the Strategy Tester
The MetaTrader 5 Strategy Tester allows you to overwrite almost all specification parameters of the main trading instrument without creating a separate custom symbol. You can change volumes, trading modes, margin requirements, execution mode, and other settings directly in the tester. This feature is useful when you need to check an Expert Advisor under different conditions, as it avoids the need to create and maintain custom symbols with their own history. If the symbol specification is customized, the gear icon and the symbol icon are marked with an asterisk to show that custom parameters are used for the current test. The tester still downloads the standard history data for the symbol, but the modified specifications are applied during the test run.
The customization is performed in the Strategy Tester settings under the Custom Symbol Settings section. You can access this by selecting the main symbol and then modifying its properties such as contract size, margin requirements, and execution mode. The changes are applied only to the current testing session and do not affect the actual symbol definition in the platform. This allows for quick simulations of different broker conditions, such as varying margin requirements or execution modes, without altering the underlying symbol data. The asterisk indicator provides a clear visual confirmation that custom parameters are active, helping to distinguish between standard and modified testing environments.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Simulating Volumes and Trading Modes
You can overwrite the volume parameters of the main trading instrument to simulate different lot sizes or minimum volume requirements. This includes setting the minimum, maximum, and step values for trade volumes, which can affect how an Expert Advisor manages position sizing. Trading modes can also be customized, allowing you to simulate different market conditions such as exchange or over-the-counter trading. The execution mode can be changed to test how an Expert Advisor responds to different order execution behaviors, such as instant execution or market execution with slippage.
These settings are particularly useful when testing strategies that are sensitive to volume constraints or execution delays. For example, if an Expert Advisor assumes a specific minimum lot size, you can adjust the volume settings to match the requirements of a different broker. The ability to change trading modes allows you to test strategies in both exchange and OTC environments, providing a more comprehensive evaluation of the Expert Advisor's performance. The tester applies these custom settings during the test run, ensuring that the simulation reflects the desired market conditions.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Margin Requirements and Execution Mode
Margin requirements can be customized to simulate different broker conditions, such as varying leverage or margin call levels. You can set the margin reserve rules and position accounting systems, including netting or hedging, to match the requirements of different brokers. This allows you to test how an Expert Advisor manages margin under various scenarios, including margin calls and stop-out levels. The execution mode can also be modified to test how an Expert Advisor responds to different order execution behaviors, such as instant execution or market execution with slippage.
These settings are crucial for evaluating the risk management capabilities of an Expert Advisor. By adjusting margin requirements, you can simulate scenarios where the account is close to a margin call, testing the Expert Advisor's ability to manage risk in such conditions. The execution mode customization allows you to test the Expert Advisor's response to different market conditions, including requotes and slippage, which can affect trade outcomes. The tester applies these custom settings during the test run, providing a realistic simulation of different broker environments.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Visual Indicator and Limitations
When custom symbol settings are applied, the gear icon and the symbol icon are marked with an asterisk to indicate that custom parameters are active. This visual indicator helps to distinguish between standard and modified testing environments, ensuring that you are aware of the custom settings being used. However, it is important to note that custom symbol settings have limitations compared to full custom symbols. The tester still uses the standard history data for the symbol, and the custom settings are only applied to the current testing session.
The limitations of this approach include the inability to save custom symbol settings for future use, as they are only applied to the current test run. Additionally, the custom settings do not affect the underlying symbol data, meaning that the history data remains unchanged. This can be a limitation when testing strategies that require specific historical data conditions. However, for most testing purposes, the custom symbol settings provide a convenient way to simulate different broker conditions without the need for creating and maintaining separate custom symbols.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Advanced Testing Settings and Commissions
In addition to custom symbol settings, the Strategy Tester allows you to configure advanced testing settings such as trading limits, margin settings, and commissions. You can set the maximum number of open orders and positions, configure sessions during which the program is not allowed to trade, and specify commission structures. Commissions can be single-level or multilevel, and can be charged immediately upon deal execution or at the end of a trading day or month. This allows you to simulate different broker conditions and evaluate how an Expert Advisor performs under various cost structures.
The advanced testing settings provide a comprehensive way to simulate real-world trading conditions, including different commission structures and trading limits. By configuring these settings, you can test how an Expert Advisor manages costs and complies with trading restrictions, providing a more realistic evaluation of its performance. The tester applies these custom settings during the test run, ensuring that the simulation reflects the desired broker conditions.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
AI-assisted educational article. Automated checks reviewed source support and quality; they do not guarantee accuracy. This is not investment advice. Leveraged and automated trading involves substantial risk of loss.
Sources & further reading
MetaTrader 5 documentation: testingMetaTrader 5 documentation: featuresEducational content only. This article is not investment advice. Automated and leveraged trading involves substantial risk of loss.