Blog

Backtesting Renko in Metatrader’s backtester using the RenkoBarsBacktesting script

This backtesting method is now obsolete – please see “backtesting with tick data suite

For MT4 build 574 and higher, this backtesting script names are suffixed with “_b574”. Therefore, you should be using RenkoBarsBacktesting_b574 and RenkoBarsBacktestingAlt_b574 scripts with the latest MT4 builds.

The backtesting feature for RenkoBars is available via the RenkoBarsBacktesting script, which is part of the Renko & Tick plug-in for Metatrader4 and is located in the Navigator window’s Scripts branch once you have the renko package installed.

This backtesting method suffices for backtesting EAs that use completed bars to calculate trading decisions (See backtesting vs. live trading comparison). Scalping EAs or EAs that rely on inter-bar price action should be tested using tick data to obtain a reliable test result.

You should only use the “Open prices only” model in MT4’s strategy tester when using this backtesting method.

When you double-click the script or drag it onto the selected instrument’s chart you will see the following backtesting options:

The variable meanings are described below:

BactestingRenkoBars – This is used to select one or more renko charts, which should be prepared for backtesting using all historical data available in MT4 (on the 1-minute chart).
The values should be separated by a comma.

i.e. 5,10,15,20 = 5 pip renko, 10 pip renko, 15 pip renko, 20 pip renko

BacktestingSpreadInTicks – This is used to select the spread value that should be used for backtesting. This value is entered in ticks so if your broker has 5 decimal quotes you should enter 20 for a 2 pip spread.

StartFromBar – This variable defines the amount of historical bars, which will be used to create the renko chart for backtesting. It is set by providing the date & time of the first 1M bar used to calculate the first historical renko bar for backtesting.

The default value of “1970.01.01 00:00” will result in using all available data on the 1M chart.

This setting will disable UseFirstRenkoPipOffset & FirstRenkoPipOffset settings if StartFromBar is set to value other than  “1970.01.01 00:00”

UseFirstRenkoPipOffset & FirstRenkoPipOffset – These variables enable (setting of TRUE) or disable (setting of FALSE) the First Renko Pip Offset (pip offset value is defined by the FirstRenkoPipOffset variable). This set of parameters are explained in section 2 of the manual shipped with the plug0 in.

BarType – This value defines the RENKO BAR TYPE – there is a choice of 3 settings all described below:

0 – StandardRenko: the value will set the chart to a standard renko brick chart (just renko bricks with no wicks)

1 – RENKO with wicks: A value of 1 will result in creating a renko chart with visible wicks, which will provide more information to the trader than the standard renko bricks do.

2 – RENKO for EA backtesting: A value of 2 will result in creating a special chart for back, which may e useful when testing certain testing EAs. This chart type provides complete price action information.

RenderUsing1MhistoryBars – This variable defines the number of historical bars, which will be used to create the renko chart for backtesting (amount of 1M data which will be processed in order to create the historical renko chart).

A setting of 0 will result in using all available data on the 1M chart.

BackTestingServerName – This is the name of the virtual MT4 server that will be created and you will need to log in to use the renko charts with MT4’s backtester.

Once you set the values above and press [OK], the script will begin to setup the virtual server for backtesting. Once this procedure is completed you will see an alert message indicating that “Renko charts are ready for backtesting on the server: renko”.

Now you can log in to the “renko” server by choosing Logon from MT4’s File menu.
This will display the following pop-up window:

Simply enter “renko” in the Server field and click [Login].
Your MT4 should now show “No connection” (this is normal.)

Next, you need to shut down MT4 and reopen it again. This time you will see the selected renko symbols ready for backtesting:

Now you can open MT4’s strategy tester and select the renko bar value to be used by the backtester:

RenkoBarsBacktestingAlt script is also included in the distribution and it is an alternative to the standard RenkoBarsBacktesting script. The alternative script generates the renko chart for backtesting on the M1 time frame as opposed to M5, which is used by the RenkoBarsBactesing script. When the M1 interval is used, MT4 will fill each renko brick with random ticks instead of the M1 price action.
IMPORTANT! – Only choose M5 for the period used for backtesting when using the RenkoBarsBacktesting script and only use M1 for the period setting when using the RenkoBarsBacktestingAlt script .

Interested in 99% modeling quality, reliable, tick-by-tick backtesting? Click Here

18

Comments

  1. reda  January 29, 2014

    Wonderful
    I wish I could add this script to system medianrenko

    thank

    reply
    • admin  January 30, 2014

      The only way median renko charts can be tested in MT4 is by using tick data. Please see the following blog post to learn why.

      reply
  2. didier  July 4, 2014

    Hi,

    Any chance to find the “enkoBarsBacktestingAlt_b574” and the “RenkoBarsBacktestingAlt”
    scripts anywhere here? Can’t find them in the VBFX pro version download links.(trying to backtest the system
    with “open prices only” option).
    Cheers.

    reply
    • admin  July 6, 2014

      When you download and install the renko plug-in, backtesting scripts will be available from your MT4’s navigator window (they will be located under the scripts branch).

      reply
  3. thomas  May 2, 2015

    can you use this on as many demo accounts as you want thanks

    reply
    • admin  May 2, 2015

      You can use the plug-in on up to 2 computers. The number of demo or real accounts is not limited in any way.

      reply
  4. Hattem  April 4, 2016

    I’ve bought the Pro version of the Renko Chart 2 days ago and installed it on MT4 build 950. The main purpose is to backtest some strategies. The indicator works well and I managed to create a virtual Renko chart using the alternative script (RenkoBarBackTestingAlt-b574).
    However, as I can confirm from the History Center the chart is generated on the 1min timeframe. This is not the problem, but when I start the backtest using a start date within the range (say 02/02/2016) Metatrader skips the start date and starts from a much later date (16/03/2016). I thought I might need to create an arbitrary candle at 00:00 at the start date but this didn’t work. Neither changing the settings for backtesting helped. I tried backtesting on several other instruments and I noticed that I have the same problem but the effective start date is different for each instrument. Any assistance is highly appreciated.

    reply
    • admin  May 18, 2016

      Please check how far does the M1 chart data go for the backtested instrument. Most likely your M1 data starts where the test starts.

      Should this not be the case, please open a support ticket with out helpdesk.

      reply
  5. thomas  May 4, 2016

    can you add indicators an make a template use it for back testing thanks

    reply
    • admin  May 4, 2016

      Yes, of course. You can perform exactly the same actions as in backtesting standard MT4 time frames.

      reply
  6. thomas  May 5, 2016

    the folder where I paste my license I think I will find in my programs c folders i look for my mt4 an open the folder can I paste my license any where in my mt4 folder thanks

    reply
  7. thomas  May 15, 2016

    I opened my origin folder tried to paste my license the paste button would not work thanks

    reply
    • admin  May 18, 2016

      You can just drag and drop the file into that folder. Please note that, if you are having problems installing or activating the software, you can always open a support ticket with our helpdesk and someone from our team will do thus for you at no extra cost.

      reply
  8. Anderson  June 3, 2016

    Boa tarde ADM…
    Tenho uma dúvida, adquiri o plug-in renko ( http://www.az-invest.eu/renko-tick-chart-plug-in-for-metatrader4 ), se eu fizer um backtest (com meu EA) com ele, ele gera o mesmo gráfico e movimento de preço que o renko em tempo real? Se sim, posso entender que se eu tiver bons resultados para trás com meu EA, se eu tivesse colocado em conta real no mesmo período eu teria o mesmo ganho do backtest?

    reply
  9. Allen  August 29, 2016

    What is the advantage of using the RenkoBarsBacktestingAlt script instead of the standard RenkoBarsBacktesting? Are they both only good for open price mode only? Is one more accurate then the other?

    reply
    • admin  September 10, 2016

      RenkoBarsBacktestingAlt is the newer version that should be used. Both plug-ins were designed to be used in open prices only mode. More accurate testing can be done using the following method: Backtesting EAs on renko charts

      reply

Leave a Reply to admin
click here to cancel reply