Sei sulla pagina 1di 19

Powered by

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.

DEFINING THE TREND & LOCAL HIGHS AND LOWS

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

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 1/3

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.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 1/3

PROGRAMMING THE INDICATORS.

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).

// definition of global variables


Variables: renko::hi, renko::lo;
// if there is a bearish renko today and there was a bullish renko yesterday, then
// yesterdays close (+1 renko) is a local high
if close<high and close[1]>low[1] then renko::hi=close[1]+(high-low);
// if there is a bullish renko today and there was a bearish renko yesterday, then
// yesterdays close (-1 renko) is a local low
if close>low and close[1]<high[1] then renko::lo=close[1]-(high-low);

Code 1: Equilla code for the “Renko Master” indicator

meta: subchart(false);

// get the renko local highs and lows and plot them on the barchart
drawsymbol(renko::hi);
drawsymbol(renko::lo);

Code 2: Equilla code for the “Renko Slave” indicator

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 1/3

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:

01. Open a chart of your underlying


02. Add the same instrument as a sub chart below
03. Set one of both charts to Renko
04. Drag and drop the Renko Master indicator onto the Renko chart
05. Drag and drop the Renko Slave indicator onto the candlestick chart

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.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 1/3

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.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


intalus.com

SHRE
THIS!

ANALYSING AND TRADING


MARKETS SHOULD BE
PLEASURABLE, NOT A CAUSE
OF PAIN.
That is why we have produced these Trading Tips.
If you have enjoyed them please help us and share them with
your friends.

SHARE THIS TRADING TIP!

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.

TREND DETECTION MADE EASY

To define a bullish market we will proceed as recommended by any book on technical


analysis: If the short moving average is above the long moving average and the mar-
ket is trading above the short moving average, this will be our definition of a bullish
trend. Just reverse the conditions to get the definition of a bearish market. Apparently,
this trend definition is more than primitive. It doesn`t account for volatility or volume,
so used on its own it most probably will generate many bad signals.

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.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 2/3

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).

Meta: subchart(false); // indicator is drawn on chart, not as a subchart like RSI


Inputs: LongPeriod(54), ShortPeriod(21); // Period of the short moving average
Variables: shortAV, longAV, colour, trend::colour, global::longAV, currenthigh, currentlow;

// calculate long and short average


longAV=average(close,LongPeriod);
shortAV=average(close,ShortPeriod);

drawline(shortAV);
drawline(longAV);

// get the renko high/low


currenthigh=renko::hi;
currentlow=renko::lo;

// basic colour of barchart (if no trend)


colour=black;

// definition of bearish trend


if close<shortAV // close below short average
and shortAV<LongAV // short average below long average
and low<renko::lo // barchart low is below last local renko low
then colour=red; // then colour=red (=bearish)

// definition of bullish trend


if close>shortAV // close above short average
and shortAV>longAv // short average above long average
and high>renko::hi // barchart high is above last local renko high
then colour=darkgreen; // if bullish then green

drawbar(open,high,low,close, colour,colour); // draw the colour coded barchart

// pass the colour information to other scripts


trend::colour=colour;
global::longAV=longAV;

Code 3: Equilla code for the “Trend Paint Renko Filter”

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 2/3

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.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 2/3

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.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


Tradesignal ® is a registered trademark of Tradesignal GmbH. Unauthorized use or misuse is specifically prohibited.
CLEAR STRATEGIES
NOT GUT REACTIONS.
Act smart and always use objective and clear signals.
Tradesignal. Überlegen handeln.

OOPS – YOU AREN`T ALREADY A TRADESIGNAL USER?

CLICK HERE  FREE TRIAL AND START TESTING

THE SOFTWARE RIGHT NOW. ORDER YOUR COPY TODAY.


RENKO TRADING. TR�DING TIPS. 10
PART 3/3

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.

ENTRY AND EXIT

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.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 3/3

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;

sell next bar at maxlist(renko::lo, global::longAV) stop;


cover next bar at minlist(renko::hi, global::longAV) stop;

Code 4: Equilla code for entry and exit

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 3/3

ADAPTING THE STRATEGY TO YOUR MARKET

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.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10
PART 3/3

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.

Take care, take profit,

Philipp Kahler
Senior Quantitative Analyst at Intalus

WATCH VIDEO TO SEE HOW YOU CAN USE RENKO CHARTS AND MORE IN TRADESIGNAL.

OR CHECK OUT OUR VIDEO CHANNELS:


VIMEO YOUTUBE

© 2014 Intalus – www.intalus.com


Distribution allowed under a Creative Commons Attribution-Noncommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Tradesignal ® is a registered trademark of Tradesignal GmbH.
Unauthorized use or misuse is specifically prohibited.

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


RENKO TRADING. TR�DING TIPS. 10

ABOUT THE AUTHOR.


Philipp Kahler.

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.

You may contact Philipp at


philipp.kahler@intalus.com

SHARE THIS TRADING TIPS! MORE TRADING TIPS!


TECHNICAL ANALYSIS &
ALGORITHMIC TRADING FOR
PORTFOLIO MANAGERS.
Control risk and return. Trade systematically. With the new Tradesignal.

1 4

Example figure from Tradesignal.

1 Strategy applied to a portfolio of EURO STOXX 50 ® stocks displaying long and


short positions and position size.
2 Total performance of the entire portfolio for the last few years.
3 Overview of current open positions and their P&L.
4 Single stock from this portfolio plus buy and sell signals along with performance.

ORDER YOUR 4-WEEKS TRIAL TODAY!


http://tradesignal.intalus.com

Intalus is the worldwide exclusive distributor of Tradesignal® | www.intalus.com


Read further information about the software here: http://tradesignal.intalus.com

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

PROFIT FROM THESE


TR�DING TIPS & VIDEOS TOO.
TRADING TIPS 07
intalus.com intalus.com

TRDING TRDING
TIPS. 01 Issue

TIPS. 07 Issue

SCAN FOR CANDLE PATTERNS.


TRADING TIPS 01
SCAN FOR THE BEST. How to find best performing 
SCAN FOR
stocks and the best risk/reward
SCAN FOR How to find the best performers out of CANDLE opportunities by identifying
THE BEST. PATTERNS.
hundreds of stocks in seconds. promising candlestick patterns.
How to find the best performers out of hundreds of stocks in seconds. How to find the best risk/ reward opportunities based on candlestick patterns.

Powered by A publication of Powered by A publication of

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.

Powered by A publication of Powered by A publication of

intalus.com intalus.com

TRDING TRDING
TIPS. 03 Issue

TIPS. 09 Issue

TRADING TIPS 03 TRADING TIPS 09


AUTO-ADJUST  UNLEASH THE
POSITION SIZE. FORWARD CURVE.
CONTROL
YOUR RISK. How to create and trade an UNLEASH THE How to visualize forward curves
AUTO-ADJUST POSITION SIZE. FORWARD CURVE.
optimal portfolio. to maximize information.
How to create and trade an optimal portfolio. How to visualize forward curves to maximize information.

Powered by A publication of Powered by A publication of

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

SHARE THIS TRADING TIPS! MORE TRADING TIPS!

Potrebbero piacerti anche