Can We Use Renko Bars to Backtest Our Trading Strategies? Full Explanation + Example

Need More Help? Book Your FREE Strategy Session With Our Team Today!

We'll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.

BOOK YOUR FREE STRATEGY SESSION NOW >>

Can we use Renko Bars to backtest our strategies? Renko Bars differ from charts commonly used in systematic trading in one important aspect: they don’t directly take time into account but are constructed only by considering price movements.

Although this difference graphically helps to reduce market noise, backtesting results are very different from those obtained with traditional candlestick charts...

Want to learn more? Then don't miss this video! You’ll discover:
-A simple and clear explanation of how Renko Bars work
-An example of a backtest using a Renko chart
-Our conclusions about the validity of this type of bars in systematic trading

Enjoy! 😎

Transcription

Introduction

Hey everyone, and welcome back to this brand-new video.

Today we’re going to be covering a topic that’s a little bit different than usual. Namely, we aren’t going to talk about trading ideas or strategy insights but about chart types, and in particular, today, we’re going to be looking at and analyzing Renko Bars.

One of the coaches at Unger Academy here.

How Renko Bars are built

Okay, so let's start by understanding how these bars are built.

Compared to standard candlesticks, which are built based on price movements as well as on a specific time frame, which is the chart resolution, Renko bars or bricks are built using only price movements as a reference.

Each bar, or brick, is created when the price of the asset moves by a certain amount.

Each brick is placed at a 45-degree angle, above or below the previous brick. Depending on the price movement we’ll have an “Up brick,” which is a green brick if the price is moving upwards

or on the other side, a “down brick”, which is a red brick, if the price is moving downwards.

If we rely only on price movements and don’t consider time directly, we’ll get a chart with an uneven distribution of times on the time axis, which is the one at the bottom.

Indeed, you can see that these session breaks, which are the lines that represent the beginning and the end of trading sessions… well, you can see that they are unevenly distributed.

That’s because on some days, like this day, for example, we would have had a more significant price movement than on other types of days like on this day here, for example, where the price moved very little in one direction, leading to the session being seen as shorter than that of other days.

In some way, this kind of chart lets us reduce the market noise just a little bit. Since not all sessions are long the same and we are taking into account only the price movement what we see in the chart is a signal that, as you can see here, is apparently cleaner.

Now, those who already know and follow us know that we’re systematic traders, and as systematic traders, we like to test trading ideas.

A trading system for Renko Bars

So let's go and create a trading system based on this type of chart, shall we? Well, let's do that.

And we did it in a very simple way.

I'm going to be showing you the system.

We have only two lines of code.

The first line tells the strategy to go long at the previous bar’s high with a stop order.

And the second line tells it to go short at the previous bar's low on the next bar. That's pretty much it.

Of course, there’s a condition for the market position.

In fact, if we want to go long, we mustn’t already have a long position open, and if we want to go short, we mustn’t already have a short position open.

I’ve left this wording with the market position. It isn’t necessary with the classic minute bars but here, with the Renko Bars, I preferred to leave it for reasons of the order of execution of the code.

Let's look at what this trading system would have done on this chart, so let's go and activate the strategy. Okay.

You can see that after a run-up, we’ll go short at the previous bar’s low, so this one here, and we’ll go long at the previous bar’s high.

And then like this, short, long, short... And this is our trading system.

Let's take a look at the performance. We’ll go straight to the equity line, and we’ll get this.

We’ll get basically only positive trades. There are only two losing trades on the long side and six losing trades on the short side.

System debugging

But you already know that this equity can’t be accurate. We haven’t found the holy grail, which doesn’t exist, and I can guarantee that there are some errors here.

But what kind of errors?

So, I told you that the Renko Bars are created based on the price movements.

Price movements are quantified by the number of points, or by a fixed percentage, the ATR, or a fixed price.

In this case, you can see that a box size is created at intervals of 100 points.

This means that… Let's go and have a look at this bar here, for example.

Let's go and read the distance between the high and the low.

We have 11,846.5, and the low is 11,821.5, which is exactly 25 points.

That's because the point identifies the tick, which is 0.25, which means that 100 points equals 25 whole points of our index.

In any case, we could go and build these Renko Bars using more or less than 100 points.

We can use 50, for example. In this case, we’ll get more trades because we’ll get more bars, but the result of our trading system is still better than before. So things haven't changed.

Now, I've told you then that the Renko Bars are built based on the price movement.

However, price movement is quantified based on a time stamp.

What I mean by that is look at the price every N minutes or every N seconds, and so on.

In this case, we’re going to assume a 30-minute price resolution.

What does that mean? It means that every 30 minutes, I’ll go and check to see where the price is compared to 30 minutes ago.

So we'll use our threshold, which we’ve just set, to build the bricks. So if we are 50 points above, we’ll build a green brick.

While if we’re below 50 points, we’ll build a red brick.

And in case we are in the middle, we are not going to build any brick.

Now, you might object to this by saying, "Well, the resolution is quite low. Why don’t we make a 1-minute resolution? That way, I can check at regular intervals every minute whether or not the brick has been closed and built."

Let's have a look at that at 1 minute, again based on 50 points, and again we’ll get a straight equity curve.

Something is missing in the information, but what?

Well, you can see that the way the bricks are built simply depends on the price close.

Why do I say that? Well, because we’ll build the brick starting from the previous brick. We said before that we must build them at a 45-degree angle, but without knowing the price progression within that price range.

It may be that, as in this case, a bar has formed, and before it gets to the new level, which is 25 points higher than the previous one, it goes down one or even two levels.

This is where we would have gone short in this case. But since we only have complete and finished bars available, it’s as if we entered the market with hindsight because we already know it’s an expected uptrend direction without considering the possible downtrends that occurred before the bar was closed.

So, what needs to be done to improve the situation? Well, you can go and see what the actual opening of the Renko Bars is.

To do that, you can use the command "Show Real Open," which will show us the actual opening of the Renko Bars.

There, you can see that when you add the real openings, the stock price starts to fluctuate a little bit.

But it does remain very good. We have an equity of 1,500 trades with a $160 Average trade in a very short period, because that’s been since September of this year.

So, in two months, we’ll make 1500 trades and earn $250,000, in just two months.

The last step still needs to be included, which is the resolution.

Unfortunately, the minute resolution isn’t enough for building Renko Bars, as we've just seen.

What you need to look at is the tick-by-tick price because that’s what effectively happens.

We can’t afford to use a minute resolution to create this chart, but the only way to test a strategy is to use a tick-by-tick resolution.

Results and final thoughts

Using a tick-by-tick resolution, we’ll get the actual historical performance of this strategy with this type of chart.

You can already see that we’re no longer in profit, but we’re losing, and our equity, here it is, becomes the real equity.

This is what actually happens when we use Renko Bars, of course in the case of a breakout strategy as the one we've just seen.

In conclusion, are Renko Bars viable tools for testing our trading systems? Definitely not.

No, because we need a tick-by-tick resolution to perform reliable backtests, and processing a tick-by-tick resolution would take many computing resources.

So, although it is true that when the chart is drawn, we get something cleaner, it is also true that what we see is simply the result of a retrospective analysis of price movements.

Guys, we hope that we clarified with this video why we base our trading systems on minute bars, so on traditional bars and candlesticks, and why we don't use Renko bars.

The reason is that you can only backtest strategies with Renko bars using a tick-by-tick resolution, that is, trade by trade, execution by execution of orders, which is what happens in live trading.

And we hope that this video has helped you better understand what Renko Bars are and why they aren’t a tool that we use in systematic trading.

And if you want to get some help to start investing systematically in the financial markets as we do, I recommend that you go and click on the link that you can find in the description of this video. That link will take you to a page with some really handy resources. From there, you can sign up for a free presentation by Andrea Unger, get our best-selling book, "The Unger Method," covering only the shipping costs, or even book a free call with a member of our team to get a free strategic consultation.

Finally, I’d like to remind you to please subscribe to our channel if you haven't already done so, of course, leave us a Like and click on the notification bell to be notified immediately when new videos and new content are released.

And with that, I will see you soon with some more new trading insights. Bye-Bye for now!

Need More Help? Book Your FREE Strategy Session With Our Team Today!

We'll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.

BOOK YOUR FREE STRATEGY SESSION NOW >>
Andrea Unger

Andrea Unger

Andrea Unger here and I help retail traders to improve their trading, scientifically. I went from being a cog in the machine in a multinational company to the only 4-Time World Trading Champion in a little more than 10 years.

I've been a professional trader since 2001 and in 2008 I became World Champion using just 4 automated trading systems. 

In 2015 I founded Unger Academy, where I teach my method of developing effecting trading strategies: a scientific, replicable and universal method, based on numbers and statistics, not hunches, which led me and my students to become Champions again and again.

Now I'm here to help you learn how to develop your own strategies, autonomously. This channel will help you improve your trading, know the markets better, and apply the scientific method to financial markets.

Becoming a trader is harder than you think, but if you have passion, will, and sufficient capital, you'll learn how to code and develop effective strategies, manage risk, and diversify a portfolio of trading systems to greatly improve your chances of becoming successful.