How to backtest Renko charts

Benjamin Melki
4 min readNov 8, 2021

--

So, you find Renko charts really clear with their little boxes and clear, almost arithmetic representation of prices, and you want to backtest them to see if they provide an edge.

The first thing you then do is a search on the internet about Renko backtest to see what other dudes have come up with. You read in disappointment that you can’t produce an accurate Renko backtest because “the results from your backtest will differ significantly from live trading”. How come?
You then go into your trading software but find that it doesn’t support Renko backtest, and if it does, backtest result indeed cannot be reproduced in live trading.

And the reasons for the hassle of producing accurate Renko backtest are simple. As the Renko charts develop in a live trading environment, the most recent bars can be redrawn… so the next bar open upon which your entry is based can be repainted as if it never existed.

Enter on next bar open backtest problem

Here is the illustration of the phenomenon in a live trading environment:

Stage 1: After a 3 bar decline, the Renko chart displays a first green bar. You want to play the reversal, so you enter on next bar at open.
Stage 2: you are in your trade, and you can see that the second green bar starts to go in your direction but is not yet completed.
Stage 3: The price goes in the opposite direction from your entry, creating a red bar and stopping you out

Look at the second forming green bar from stage 2: it doesn’t exist and vanished from the chart. And here lies the problem: while backtesting, you would have never entered the trade in the first place if your entries were based on the next bar open, as is the case in most backtesting software. But you did enter it in live trading. This irremediably creates a discrepancy between live environment and backtesting based on a next bar element: on backtest, entering on next bar open would assume at least 1 bar went into your direction, creating a future-looking positive bias and positively inflated equity curves.

Problem with time based Renko Charts

Another problem with backtesting Renko is using tick resolution mixed with time-based charts: many trading platforms don’t support real tick data. They only support minute data. This is because when one subscribes to a datafeed, they are usually provided with two types of data: minutes data and tick data. Tick data involves considerably more resources, so some software vendors simply don’t propose it to their clients: notable such software comes to mind at this day of writing: Tradingview and TC2000 (which are good packages otherwise).

So some platforms propose Renko charts but based on underlying time data: such as daily or minutes data. True historical and real-time Renko charts are built from tick data, have a fixed tick-based height and there is no time dimension to them. Period. With time-based data, you introduce a repainting problem again. While plotting your historical x ticks Renko chart based on time data, the charting engine will have no way of knowing the intrabar fluctuations, so it will stack Renko bricks from the underlying time bar Low to High or Open to Close… a development that never happened in real-time where the Renko bricks zigzagged tick by tick before the time bar closed. Good luck with backtesting that and trying to match results in a live environment.

Here is how to properly backtest Renko Charts:

  1. Use data with tick resolution. No time based resolution. This is highly dense data because it comprises each and every trades that happened.
  2. Use a software that can build Renko bars from true tick data feed, both for live real-time trading environment and for historical charts. You can still play with the number of ticks per renko bars if you want to vary the length of your charts.
  3. Set your Renko brick size to a fixed number of ticks.
  4. Set your Renko chart to display wicks. So you can see all price levels hit by the Renko bars. This can help for targets and stops.
  5. Set your backtest platform to enter on bar CLOSE. On Renko charts, the bar close is definitive, so this is something you can rely on.
    Or if your software supports intrabar entries, you can enter on any price hit by the Renko bars… but in this case, your software must allow displaying bar wicks.
  6. For exits, you can set distance level from your entry, so if the price touches it, you will exit INTRABAR. So your software must support intrabar exits. You can also exit on a bar Close.

If those conditions are met, you can as reliably backtest Renko charts as you would backtest any other kind of chart.

For my backtest, I use Linnsoft Investor/RT software with their DTN historical data. That package meets all the requirements.

And here is a properly built Renko chart with respect to all the above conditions:

ES. 4 ticks Renko chart with wicks.

Sample Renko backtests and results

Backtest: Renko reversal
Renko backtest: First higher low
Renko Backtest: high breakout

--

--

Benjamin Melki

Exploring, backtesting exotic and less exotic trading methodologies.