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