Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PARTS 1–3:
TIPS.
TRDING
ALGORITHMIC
A publication of
TRADING WITH
RENKO CHARTS.
How to combine Renko charts and Bar charts to create a profitable trading strategy.
1–3
Issue
intalus.com
10
SKYSCRAPER 01. Menara Carigali, Kuala Lumpur. SKYSCRAPER 02. Petronas Twin Towers, Kuala Lumpur.
The todays third tallest building in Malaysia on the scale of 267 metres high. The todays tallest building in Malaysia on the scale of 452 metres high.
RENKO TRADING. TR�DING TIPS. 10
PART 1/3
RENKO TRADING.
PART 1: How to define trend direction and local highs and lows.
Renko charts are a fascinating chart type. They are a kind of simplified point & figure
chart, easy to read and great for trend following strategies. This three-part series
Trading Tips will show you how you can use this chart type to construct a simple tra-
ding strategy. You will learn how to read this chart, how to program a trading strategy
and how to combine different chart types in one trading strategy.
STRATEGY DESCRIPTION
The general idea behind this trading strategy is a trend following approach. Therefore
we will have to find out if there is a trend and define its direction. In the next step we
will use the local highs and lows for the entry and exit. If our trend detection thinks
that there is a bullish trend in the market, we will go long if the market makes a new
high. To close the long position we will use the local lows. If the market makes a new
low, this will be our exit signal. Additionally some kind of trailing stop to lock in profits
and reduce risk will be required. If done, we will have a fully automated trading stra-
tegy that can be tested for profitability in any given market.
Let us start with the definition of the trend first with a classic approach which uses
two moving averages. If the short average is above the long average, and the market
trades above the short average, this will be our definition of an up-trend. Don’t worry
about the period of the moving averages, when the strategy is done Tradesignal will
find the perfect period using the built-in optimizer.
Because this is quite a simple concept, which can be found in any beginners guide
to technical analysis, we will also use the local highs and lows so the quality of the
trend detection itself is not so important. While bar charts or candlestick charts offer
no objective and satisfying solution, Japanese Renko charts are the perfect choice
for defining local highs and lows. Similar to point & figure charts, they show the price
without a continuous time axis and are constructed from “boxes”, each box represen-
ting a specific price change. For example, a Renko chart where one box represents 10
points and the markets moves up 100 points, the Renko chart will show you 10 bullish
boxes; regardless if this move takes place in one day or one year. If the market moves
less than 20 points, no new box will be drawn. To reverse the direction a minimum
counter move of at least 10 points will be needed. As you can see, this simple box
algorithm filters out small price moves, so the fuzz is being removed and only signifi-
cant price moves are plotted.
Now have a look at the chart and you will see how easy it is to define local highs and
lows in an objective way: A local high is defined as the point, where the Renko chart
changes from bullish boxes to bearish boxes. That’s all! The following comparison
between a candlestick chart and a Renko chart speaks for itself.
Figure 1: Renko charts show trends and reversals in a clear and objective manner. Hence they are a very good tool in a simple
trading system.
Using this definition of local highs and lows we can write a short script to calculate
these points on the Renko chart and show them on a candlestick chart. The calcula
tion of the highs and lows is done with the following Renko Master indicator.
Two global variables above were used in order to pass this information to the follo-
wing Renko Slave indicator, which in turn plots the Renko highs and lows on a classi-
cal candlestick or bar chart by plotting points or circles (see code 2).
meta: subchart(false);
// get the renko local highs and lows and plot them on the barchart
drawsymbol(renko::hi);
drawsymbol(renko::lo);
DO IT YOURSELF MANUAL.
How to chart this graph on your own and see local highs and lows from the Renko
chart on another chart? Very simple:
Figure 2: Using the Renko Master and Slave indicator the local highs and lows from the Renko chart are transferred
to the bar chart. The box algorithm filters out small price moves, so only significant price moves are plotted.
By implementing both indicators a significant step towards our Renko trading strategy
is accomplished. In the second part of this mini series we will add a trend detection
and colouring of the chart based on the trend direction, which will mark another step
forward. The third issue of our Renko trading strategy series will provide a program-
ming code which defines the entry and exit rules.
SHRE
THIS!
Powered by A publication of
RENKO TRADING. TR�DING TIPS. 10
PART 2/3
RENKO TRADING.
PART 2: Long or short? The colour of the chart will tell you!
The first part of this mini series showed you a way to combine different chart types
and pass information from one chart to another, using global variables.
We used Renko charts to calculate local highs and lows. These important chart points
where then displayed on a Candlestick chart. The second part of this series will utilise
moving averages to define the direction of the current market trend, combining it with
the Renko highs and lows and colour code the chart according to the outcome of our
computer analysis. At the end of this article you will have a chart that turns green
when it is time for a long position, and red, if the bears have taken control.
But don’t forget – we already have calculated the local highs and lows of the market,
and they will filter out many of the bad signals. Therefore we just have to add one
more condition: If the averages signal a bullish market phase and the price trades
above its most recent local high, then – and only then – our trend detection should
colour code the chart in green. So there is no bull market unless the price generates
a new high.
PROGRAMMING CODE
Now let`s have a look at the code of this trend detection indicator. The ‘meta’ section
defines where this indicator should be shown on the chart. ‘Sub chart (false)’ means
that it is shown on the chart, not in a separate sub chart like the RSI. The input section
defines the length of the moving averages. By doing so the periods can be optimized
later on to adjust this indicator to any market and time frame.
The variables section is needed to define the placeholders for our calculations. Beside
the local variables for the moving averages, the colour and the Renko highs and lows,
two more global variables were added to pass the outcome of this indicator to the
trading strategy. The global colour is needed to define whether the market is in a long
or short mode. The global long average will be used as some kind of trailing stop loss
(to be described in part 3 of our series).
drawline(shortAV);
drawline(longAV);
The following chart shows the EUR/USD daily chart with the Trend Paint Renko Filter
discussed above. The price chart is being coloured green (red) when the following
conditions are met: Firstly, the moving averages have to signal a bullish (bearish) mar-
ket phase. Secondly, the price has to break above (below) the previous Renko high
(low).
The first half of 2012 serves as a good example for the advantage of using the local
highs and lows as an additional filter. As you can see, no bullish trend had been detec-
ted, even though the price broke above the moving averages.
Figure 3: EURUSD daily chart with “Trend Paint Renko Filter” and local highs and lows derived from the Renko chart.
CONCLUSION
With the second part of our Renko trading series we fulfilled another important re-
quirement for our trading strategy. In the first step all conditions for a long or short
entry were clearly defined by combining the moving averages with the local highs and
lows. Then we programmed a code which colours the price chart subject to the trend
condition. Green colouring signals a bull mode while a red chart signals a bear mode
– very simple isn`t it? In our third and last part of the Renko series we will show how
the trading strategy generates entry orders, how it can be tested and how well even
such a simple strategy performs.
RENKO TRADING.
PART 3: How to assemble all components to a full trading strategy.
The first and second parts of this special Renko Trading Tips showed a way to define
a trend using the Renko highs and lows with moving averages. At the end of part two
a bar chart was colour coded according to our computer trend analysis, the colour
and the long moving average were saved in a global variable. Using this information
we will now generate the actual trading signals. When done, we will have a complete
automatic trading strategy that can be back tested and optimized.
In the previous part we showed that the colour of the bar chart defines whether the
market is in bull or bear mode. As we have got the colour of the chart in our global
variable we can start with two simple orders for the position entry:
01. If the chart is green then open a long position
02. If the chart is red then open a short position
That`s just the entry. Additionally we need some kind of exit. One possibility would
be to define a black chart as an order to be flat, since it means that there is no trend.
But that would not be the best idea for two reasons. When you have a close look at
the colour coded chart you will notice that there are some black days within a fully
functional trend. The market might just rest for some days, and it would be useless to
close out the position with the first black day. Usually the market continues its trend
very soon, so constantly getting in and out of position just costs a lot of money. On
the other side there might be a fast trend change, and our trend detection is just too
slow, so we might even want to get out of a long position although the bar chart still
is coloured green.
The proper solution is to define a two-step exit. To get out of a long position the long
moving average is used as some kind of trailing stop, while the last local Renko low
serves as a chart based stop. The system gets us out if the average or the local low
is touched (whatever comes first). The same logic applies for the short side.
PROGRAMMING CODE
The following code represents the trading strategy. First a variable for the colour of
the chart is defined. Then the global colour variable is written into the local one. This
seems to be a useless thing, as the global variable will always contain the same value
as the local one, but this trick is used to bypass a very specific Tradesignal feature
(global variables do not have a value for yesterday). This just means, that you can not
ask the question “what colour did the chart have on the bar before” using the global
variable. But you can do so using the local one! Therefore the global variable was
written into the local one.
After the colour has been saved the entry command is the next part of the code.
Translated into plain English it goes like this:
If the chart is green and the chart has not been green on the bar before and the chart
has not been green 2 bars before then go long at the end of the current bar.
The term “not green yesterday and the day before” is another programming trick. It
reduces the signal frequency in uncertain times; uncertain times when there is no
strong trend and our very basic trend detection is switching between green and black
on a daily basis. The entry condition for the short entry is just the same as for the
long position, only that the chart has to be red. Next in the code comes the exit. As
mentioned before two levels for a possible exit are used. The ‘maxlist’ and ‘minlist’
command takes care of which stop level is closer to the current price and therefore
used for exit.
Variables: colour;
colour=trend::colour;
if colour=darkgreen
and colour[1]<>darkgreen
and colour[2]<>darkgreen
then buy this bar on close;
if colour=red
and colour[1]<>red
and colour[2]<>red
then short this bar on close;
Drag and drop the strategy onto the bar chart, and if everything goes well, you should
see an equity line appear as a new sub chart. This equity line gives you the theoretical
profit of this specific strategy in your chosen market.
Figure 4: The Renko trading strategy presented in our Trading Tips series generated stable results on a long term basis. It can be
used for any market and can be adapted by modifying both the box size and the length of the moving averages.
If you wish to adapt this strategy to your favourable market, there are two things
you can do: First you can change the size of the Renko bricks. Usually a box size of
about 0.5% to 2% is chosen. Whether you would like to enter a fixed amount on the
properties page of the chart or rather use a percent value – with Tradesignal you can
do both. The other thing is the length of the moving average. To find the best moving
average for your market you can use the built-in optimizer. How to optimize moving
averages without falling into the curve fitting trap will be the topic of one of the next
Trading Tips.
Philipp Kahler
Senior Quantitative Analyst at Intalus
WATCH VIDEO TO SEE HOW YOU CAN USE RENKO CHARTS AND MORE IN TRADESIGNAL.
Philipp is the Senior Quant Analyst at Intalus. He was born in Austria and studied
electrical engineering before joining a large German bank where he developed fully
automated trading strategies for the proprietary trading department.
His book about designing successful trading strategies has been among the top
sellers in Germany for the last two years. Currently at Intalus, he is responsible for
the in-house training of institutional traders and the development of custom-made
algorithmic trading strategies.
1 4
EURO STOXX 50® is a registered trademark of STOXX Limited. Zurich. Switzerland. Tradesignal® is a registered trademark of Tradesignal GmbH, Bremen, Germany | www.tradesignal.com.
RENKO TRADING. TR�DING TIPS. 10
TRDING TRDING
TIPS. 01 Issue
TIPS. 07 Issue
intalus.com intalus.com
TRDING TRDING
TIPS. 02 Issue
TIPS. 08 Issue
TRADING TIPS 02
SPEED UP YOUR TRADING TIPS 08
DECISIONS. INDICATORS
ON INDICATORS.
SPEED UP YOUR How to creat your own INDICATORS
DECISIONS. ON INDICATORS.
equity basket. Simple steps to advanced analysis.
How to create your own equity basket. Simple steps to advanced analysis.
intalus.com intalus.com
TRDING TRDING
TIPS. 03 Issue
TIPS. 09 Issue
intalus.com
TRDING
TIPS. 04 Issue
TRADING TIPS 04
HIGHLY EFFICIENT
SHORTING.
HIGHLY
EFFICIENT How to identify and profit well
SHORTING.
from a short trade.
How to identify and profit well from a short trade.
Powered by A publication of
intalus.com
TRDING
TIPS. 05 Issue
MORE KNOW-HOW AND VIDEOS HERE
TRADING TIPS 05
RULE-BASED TRENDLINES. www.intalus.com/tradingtips
RULE-BASED
TRENDLINES
IMPROVE How to use point & figure trend
DISCIPLINE.
lines in candlestick charts.
How to use point & figure trend lines in candlestick charts.
Powered by A publication of
intalus.com
TRDING
TIPS. 06 Issue
TRADING TIPS 06
PROFIT FROM
GAP TRADING.
PROFIT FROM
GAP TRADING.
A simple, but effective strategy.
A simple, but effective strategy.
Powered by A publication of