How to Create RENKO Bar Charts
and Backtest a RENKO EA in MT4

Download the FREE RENKO Script Below!

Stacked-white-342-wide
Watch the RENKO Bar Video Tutorial
Skip to Minute 8:15 for Backtesting and Minute 12:00 to see the EA in action!
Subscribe to my Channel & Enable Notifications for New Videos!

RENKO Bar charts (aka RENKO Brick Charts) were created by the Japanese, as were candlestick charts, sushi, and very reliable cars. While candlestick charts show price movement within a specific period of time, Renko bars completely ignore time and only record price movement. This filters out a ton of market noise and really cleans up the charts because moves smaller than your bars are simply not recorded.

If price moves up a minimum of X pips, it creates a new Bullish bar. If price moves down X pips, it creates a bearish bar. To create a reversal bar, the most common setting is to require a move DOUBLE the size of the previous bar that was in the opposite direction. This helps prevent false reverse signals so you can hold a position in a trend longer. Renko bars have an uncanny ability to create order out of chaotic conditions and the larger your bars, the more it cleans up the charts.

1-Hour Candlestick ChartEURJPY 1-Hr Chart2

25-pip RENKO Bar ChartEURJPY Renko-25-2

DOWNLOAD THE FREE RENKO SCRIPT

Before you can get started, you must CLICK HERE to Download my FREE RENKO Bar Script but you must be logged in to download it. Register for FREE Here or Login Here. Then copy/paste the Renko_Bars.ex4 file inside your Scripts folder in MT4 (located under MQL4/Scripts).

Renko Bars are created from 1-minute candlesticks for the highest level of price/time accuracy. (See #15 below to import multiple years of 1 Minute data). Open a 1-minute candlestick chart of your desired currency pair. In these examples, we'll use EUR/JPY.

1. Open your MetaTrader4 Platform and click File then New Chart then choose your desired currency pair.

1. Click File-New Chart

2. A 1-hour chart will open by default so click M1 at the top of your chart to get 1 minute candlesticks. NOTE: To get the most 1-minute candlesticks on your chart, click on the chart then press and hold down the "Home" key on your keyboard. You should be able to load 2-3 months of 1-minute data, depending on your broker. In Step #15 below, I'll show you how to download up to 10 years of 1 minute data.

2. Click M1

3. Attach the Renko script to your 1 Minute chart.

A. Click the Navigator Icon to expose the folder menu
B. Double Click on the Scripts Folder to open it
C. Double Click the Renko Bars file

3. Open Scripts

4. In the Common tab, use these settings for both Live Trading and Back-Testing.

5. Common Settings

5a. RENKO SCRIPT Settings for LIVE TRADING

On the INPUTS tab: The settings are mostly self-explanatory except for the "TimeFrame" setting and it's critical that you understand this and get it right. To operate as a live chart FOR LIVE TRADING, you must choose a NON-standard (unsupported) time frame so it does not conflict with one of the supported candlestick time frames offered in MT4, otherwise MT4 will attempt to overwrite your Renko bars with candlesticks using the standard time frame you chose. So, for LIVE trading Renko bars, DO NOT use: 1, 5, 15, 30, 60 (1 hour), 240 (4 hours), or 1440 (1 day). What I normally do is add the number 1 to the number in the BarRange setting. For example, if I'm using 15 pip Renko bars, then I would enter 115 for the TimeFrame because I can't use the number 15, which is a standard time frame offered in MT4. But by using 115 instead, I can tell at a glance that it's a 15-pip Renko bar chart and yet, it does not conflict with a supported 15 minute chart. In the screenshot below, I used 10 pip bars (BarRange) and 110 as the TimeFrame. These are the LIVE Settings used in the EUR/CHF RENKO Robot.

5b. RENKO Script Settings for BACKTESTING

FOR BACK-TESTING, you will need to handle the TimeFrame setting in the opposite manner because the MT4 Strategy Tester does not recognize non-supported time frames, such as 110 like we used in the live trading settings above. Therefore, choose any supported time frame in minutes, such as 1, 5, 15, 30, 60 (1 hour), 240 (4 hours), or 1440 (1 day) but it's best to choose a time frame you rarely use. It will create a Renko chart labeled as your chosen time frame and then you'll be able to attach an EA to it and perform back-tests. But also be sure to have the "Backtestmode" setting as True or it will not back-test properly. The settings below were used to create the backtest reports shown on the EUR/CHF Renko Robot page. SEE STEP 13 for another important step in backtesting an EA on a Renko chart.

5c. Loading a RENKO Script PRESET FILE

If you purchase any Roulette TRADER Renko EA, it will include preset files for the Renko Bar Script for both Live Trading and Backtesting so you may simply load a preset file instead of manually adjusting these settings each time you attach the script. After attaching the Renko Script to a 1 Minute chart, click LOAD, then choose your desired settings from the preset files and click Open. It will automatically load your desired settings and save you a lot of time. You may also save any new settings you create yourself to load later in the same way (see #6 below).

6.  Optional: You can save these settings by clicking SAVE in the previous step. The window below will appear. Name the settings based on the size Renko bars and whether it's for Backtesting or Live Trading. You can see in my screenshot below that I have settings for many different sized bars. Some are for back-testing and I normally enable Tails for live trading. Saving these settings makes it quick & easy to load the appropriate settings in the future.

6. Save Settings

After your settings are saved, click OK on the previous window to build your Renko chart.

7. After attaching your Renko script with your desired settings and clicking OK, the script will create your Renko bar chart using the 1-Minute data on the chart it is attached to. It cannot create Renko bars from historical data that is not loaded on your chart so load as much 1-Minute data as possible before attaching your Renko script. Your Renko Chart details will be displayed in the top left corner of the chart the script is attached to (the script should ALWAYS be attached to a 1 Minute chart).

IMPORTANT: EACH TIME you restart MT4, the script becomes disabled and you MUST RE-ATTACH THE RENKO SCRIPT to the 1 Min chart reactivate it or it will not build new bars on the chart your EA is attached to, which will, in turn, stop your live trading. If the top left area ever says "Renko bars finished", that means the Renko script has been disabled (usually from an MT4 shut down) and must be reattached to continue building bars in live trading. For this reason alone, it is best to only use a Renko EA when your MT4 is running on a VPS or cloud server where it can run 24/7 without interruption. Forgetting to re-attach the Renko script will cost you a lot of missed trades (speaking from experience). Click Here to find some good VPS services here.

8.8. File, Open Offline
9.

10. Your RENKO Chart will open. By default, it will open with all green bars so you may choose a Template to change the appearance. Here I chose my desired Red and Green bars with a black background. All Roulette Trader EAs include a similar template that you could load.

11. (OPTIONAL): If you want to create a template that looks like this, right click on the chart and select Properties at the bottom of the popup window.

Here, you'll be able to customize the colors and background of your chart. Copy these settings if you want to make it look like mine.

11. Chart Colors
11. Common
13. Save Template

Your RENKO Bar Chart is Now Ready

12. Your RENKO Chart is now ready for LIVE Trading.

CLICK HERE for a tutorial on
attaching your Expert Advisor to your chart.

RENKO BAR BACKTESTING TIP

13. To backtest your EA on a Renko chart, first create a Renko chart using a standard time frame (see step 5b above) then open that offline chart.

Then attach the EA to the Renko chart (click and drag it onto the chart from the Navigator), right click on the chart and choose "Expert Advisors > Strategy Tester" from the popups. It will then open the Strategy Tester with the EA already loaded on the appropriate offline Renko chart that you can backtest. If you skip this step and select the EA and time frame from within the Strategy Tester, it will choose the online version of your renko chart by default, which would be a normal candlestick chart so DO NOT SKIP THIS STEP FOR BACKTESTING!

NOTE: You should consider disconnecting your PC from the internet immediately after opening your offline Renko chart for backtesting.  Otherwise, MT4 could begin to update the data and convert your Renko bars to standard candlesticks. This is because Renko charts for backtesting run on supported time frames and the MT4 platform doesn't know the difference between a Renko Chart and a candlestick chart when they use the same time frame. It identifies the renko bars as errors in the price feed and attempts to correct them.

This does NOT occur during live trading because we use non-standard time frames for live trading.

SEE EA BACKTESTING TUTORIAL

IMPORT MORE 1 MINUTE DATA

14. You can download many years of 1 Minute data at:
http://www.histdata.com/download-free-forex-data/?/metatrader/1-minute-bar-quotes

a. At the link above, choose the currency pair and year of data you want to import and save the .csv file to your hard drive.

b. In your MT4, open Tools > History Center and choose the matching currency pair and 1 Minute time frame.

c. Click "Import" and Browse. Find the 1 Minute .csv file on your computer. If the default import settings match your csv file, then the data will appear legible in the Import Display popup window. If the data looks scrambled and not separated properly, then adjust the Separator settings until the data looks organized and click "OK".

d. If the settings are correct, it will load the 1 Minute data into the primary display window. The time stamp on the 1 minute bars will place it in chronological order by default.

e. If you end up with a data gap, it will appear as multiple bars with huge wicks or tails on your charts but this can also occur in the case of very large 1 minute bars. You can fill most data gaps by downloading the missing months from the same website.

f. If you're unable to patch gaps in your data, it's best to delete your 1 Minute data completely and start over. To do so, close any open 1 Minute charts for that currency pair. Open your MT4 Data Folder (click File/Open Data Folder), open your History folder and delete the 1M .hst file for that currency pair. Then close and reopen your MT4 platform. You will have a clean slate for that currency pair's 1 Minute data. Repeat the steps above but import as much data as possible up to the current date from the .csv file up to at least the last 30 days. Your live MT4 charts will fill in the rest.

Copyright 2023 - Roulette Trader - All Rights Reserved