IFC Markets Forex Broker

Advisor Tester - Trading Strategy Tester

The trading strategy tester is intended for evaluating the effectiveness of operating a user expert on historical data. While testing, the tick sequence is modeled on the basis of price bars, so there may be some inaccuracy between the results of the expert's work in the tester, and in real time.


To start the strategy tester, click on the item View in the main menu and select Advisor Tester. This will open the tester window with tabs for specifying its parameters and modes.


Parameters tab - Testing Parameters

The Parameters tab is used to specify testing parameters of your trading expert. Let us examine the dialog window elements and their purpose:


Advisor Tester

The drop-down Advisor list allows you to select an expert. The list contains all the compiled scripts in the Advisors folder and in its subfolders.


The Properties button is used for calling up a dialog window for changing the expert properties. This dialog window is only available for experts that use global variables specified with the keyword extern.


The drop-down list for choosing a symbol for testing. The list coincides with the symbols in the Market Watch window.


The drop-down list for selecting the interval for testing. Standard intervals are available:

  • Minute
  • 5 Minutes
  • 15 Minutes
  • 30 Minutes
  • 1 Hour
  • 4 Hours
  • Daily
  • Weekly

The Spread drop-down list – choosing a spread for testing. The list allows the user to enter any positive value, or select a value from the list; the current spread option corresponds to the current spread for the selected instrument.


Choosing a testing method: Control points or Open Prices Only. In the Control points mode modeling of ticks goes as follows: there are 4 ticks modeled for each bar. When the closing price is higher than the opening price, the ticks are formed in the following sequence: Open, Low, High, Close; when the closing price is less than the opening price the following sequence is formed: Open, High, Low, Close. In the Open Prices Only testing mode each tick corresponds to opening bar price. This testing method is suitable only for advisors making deals on the already formed bars. The testing speed for this method is higher than in the Control points mode.


Selection of a minimum order distance. The field allows specifying any positive value or choosing a value from the list of standard options. The Current distance option corresponds to the actual distance of orders, determined for the specified instrument at the moment.


The Limit dates check box is used to limit a testing range. When the check box is off, the testing goes through the full history loaded for the selected instrument; when the check box is on, the fields From and To are activated for specifying the range of dates for testing.


Fields of specifying dates for testing limitation. The date of the test beginning is determined in the From field, the date of the test end is specified in the To field. If the interval for testing exceeds the range of the loaded history data, then zero price values will be used for the dates out of the range.


The Initial Deposit field is used to specify the deposit in dollars (USD) when the testing process starts.


The Enable visual mode check box. When the check box is on, the moments of trading operations and orders are displayed on the chart during the testing. This mode reduces the speed of testing.


The testing speed slider and the "pause" button are used for speed regulation in an enabled visual mode.


The Enable expert logs check box puts out printing on the Journal tab.


The Start (Stop) button is used to run the test and to stop it prematurely.


When carrying out a visual test the chart is displayed on a grey background and the moments of the opening / closing positions are highlighted: opening a Buy position – black arrow, opening a Sell position – red.


Advisor Tester

The Results tab - tabular representation of results

Advisor Tester

The Results tab provides information about all the positions opened during the testing. The data is in a tabular format. The Closed Positions table displays the positions that have been closed, and the Open Positions table displays all the positions remaining open when the testing is complete.


Each position in the Closed Positions table contains:


  • # – ordinal number of a closed position
  • Deal ID – position identifier
  • Symbol – symbol on which a position is open
  • Direction – direction
  • Volume 1 – position volume in the base currency units
  • Volume 2 – position volume in the quote currency units
  • Open rate – open price
  • Open time – date and time of opening
  • Stop loss – stop loss level (the value is not displayed if the linked stop loss order was not available)
  • Take profit – take profit level (the value is not displayed when the linked take profit order was not available)
  • Last swap* – position swap (not calculated in the current version)
  • Rate close – closing rate
  • Time close – closing time and date
  • Profit – deal profit
  • Balance* – balance after a position is closed
  • Equity* – equity after a position is closed

The table can have items sorted by any of available fields. Click on the corresponding column's heading for sorting.


* This field is displayed when the Show extended columns mode is on. This mode can be activated via the context menu of the table.


Unclosed deals have the following information displayed:


  • Deal ID – position identifier
  • Symbol– symbol on which the position is open
  • Direction – direction
  • Volume 1 – position volume in the base currency units
  • Volume 2 – position volume in the quote currency units
  • Open rate – open rate
  • Open time – date and time of opening
  • Stop loss – stop loss level (the value is not displayed if the linked stop loss order is not available)
  • Take profit – take profit level (the value is not displayed when the linked take profit order is not available)
  • Last swap – position swap (not calculated in the current version)
  • Profit – position profit (when the testing complete)

The dialog box displays the testing summary data at the bottom that includes:


  • Balance
  • Equity
  • Margin – margin maintenance at the end of testing
  • Margin free

Equity Graph - graphical representation of equity and changes of the balance

Advisor Tester

The horizontal axis of the chart shows the numbers of closed transactions, the vertical axis – current equity / balance. The blue line shows the change of balance, the green one shows the change of equity.


A double-click opens the Results tab with the selected deal that corresponds to a specified position on the chart.


Journal - expert's message log

The Journal tab shows the output of the System.Print function used in an expert. The information is displayed in a table consisting of two columns: the first column shows the time of the event, the second one – the text of a message. If the Enable expert logs check box on the Parameters tab is disabled, the journal will have only start and stop expert's commands displayed.