Testing strategies (EA) on Renko/Range Bar charts on the MetaTrader 4 platform

In this article I will present a simple method of testing expert advisors on offline charts (e.g. Renko, Range Bar) on MetaTrader 4 platform. At first, we need a script, that genertes an offline chart. On the Internet there are many such scripts. They can be found for example under the following links:

Renko Live Chart

Range Bars

When you put a a script on a standard chart it generates the offline chart. However, this offline chart cannot be used on a strategy tester. To change this, we need to replace some history files, so that the data of standard chart (e.g. EURUSD M5) is changed by the data of generated offline chart. Of course, we do not want to lose a possibility to test expert advisors on a standard chart, so we will create a special server dedicated for testing expert advisors on offline charts. For this purpose:

  1. Open MetaTrader 4 folder (File->Open Containing Folder), go to Folder History and create new folder e.g. Offline.

    Folder Danych

  2. Copy the following files from the folder broker_name_demo to folder Offline:
      • symbols.raw
      • symbols.sel
      • symgroups.raw
      • ticks.raw
      • one minute history files, for example EURUSD1.hst, GBPUSD1.hst, USDCHF1.hst, EURPLN1.hst

    Historia

  3. Change login account (File-> Login to Trade Account). Write Offline as a server name (at this moment we will lose a connection to the server).Logowanie
  4. Reset the MetaTrader 4 platform. Only one minute charts, copied in the second step, will be available
  5. Put a Renko/Range script on a one minute chart. In the parameters tab, define a period of new chart, so that this is a standard timeframe (e.g. EURUSD5).RenkoLiveChart
  6. Run the strategy tester and test the expert advisor.Tester

Share with your friends:

Send us your comments

Name (required)

Email (required)

Message

  • Facebook