You are on page 1of 38

LizardTrader

Renko Bars
User Manual
2

Table of Contents

1. Introduction to Renko Bars 3

2. The LizardRenko Bars 9

3. Quick Start Guide 12

4. Working with LizardRenko Bars 16

5. Applying Indicators to the Lizard Renko Bars 21

6. The Renko Tools 25

7. Accessing the Renko Bars via NinjaScript 30

8. Backtesting and Automated Trading 32

The manual refers to version 1.4 of the LT_Renko_ Bars for NinjaTrader 8.
3

1. Introduction to Renko Charts

A renko chart is a type of chart of Japanese origin which is built using


only price movement. Presumably, renko charts are named after the
Japanese word for bricks, “renga” as the chart looks like a series of bricks.
The original renko chart uses the same brick size for all chart bars.

A new brick is added above or below the last brick, as soon as price has
moved a specific amount called the bricksize. For an upward move the
bar close for the next renko bar is found by adding the brick size to the
high of the prior bar. For a downward move the next bar close is found by
subtracting the brick size from the low of the prior bar.
Pursuant to this assembly, Renko bars are designed to emphasize trends
and filter out sideways markets. Renko charts look smoother and make it
easy to identify trends. Furthermore renko bars eliminate both time and
volatility.
4

A trend continuation bar closes after price has moved in the direction of
the prior trend by an amount equal to the brick size. Conversely,
completion of a reversal bar requires a move of twice the brick size in the
opposite direction. Although both trend continuation and reversal bars
are represented by a single brick, a reversal bar effectively has twice the
size of a trend continuation bar.

Unwanted properties of renko charts


Renko charts also have a few unwanted properties that need to be taken
into account:
- renko charts fill gaps with fake bars that have zero volume
- a renko bar close may plot at a price level at which the charted
instrument never traded
- renko charts do not show real highs and lows as a new brick is only
added when the price move has reached the required brick size
- all reversal bars on a renko chart have fake open prices, as the current
open is drawn near the open and not near the close of the prior bar
5

- all indicators that use the bar opens, bar highs or bar lows as an input
series should not be applied to renko bars
- strategies running on renko bars cannot be backtested, as market
orders will use fake open prices to simulate fills
- most renko bars have false time stamps or time stamps that do not
match the closing price of the renko bar
- renko bars cannot be used in multi-bar series scripts or with tick
replay
In conclusion, renko bars – although they emphasize trends and
eliminate sideways price action – are difficult to handle.

Principles for building price bars suited for system trading


Our main goal for introducing the new renko bar was to get rid of all the
unwanted properties. At the same time we wanted to follow the standard
principles for building simple and effective price bars from a set of
consecutive transactions:
 The opening price is the price of the first transaction of the set.
 The high of the bar is the highest price of all transactions of the set.
 The low of the bar is the lowest price of all transactions of the set.
 The closing price is the price of the last transaction of the set.
 The time stamp of the bar is the time stamp of the last transaction of the
set.
 The volume is the total added volume of all transactions of the set.
When these six principles are followed
- indicators may be applied to the chart bars
- backtests will return meaningful results
- the chart bars may be synchronized with other suited bar types in
multi-bar series scripts
- the bars may be used with tick replay
Most of the renko bars available for NinjaTrader do not follow these
principles, because they focus on the visual design of the renko bars
rather than making them suitable for system trading. The result are fake
bars with false prices or zero volume.
One solution to this problem is to create renko bars that are built from
genuine prices and then dress these bars with appropriate chart styles to
make them look as standard renko bars.
6

Introducing chart styles


When building a renko bar based on the six principles, they do not look
as visually appealing as traditional renko bars. There are gaps and the
reversal bars have larger bodies than trend continuation bars. Such a
renko chart can be aweful to look at and is barely recognizable as a renko
chart. Below is an example of a renko chart based on genuine data.

Fixing the aweful looking chart introduces the topic of chart styles. They
can be used to implement design features of renko bars without using fake
prices. Chart styles do not change the underlying data and have no impact
on indicator calculations, backtests or other bar properties. Chart styles
typically recalculate bar open, bar high and bar low, but they do not touch
the bar close. When applying a chart style, the genuine open may be
replaced with an esthetically pleasing fake open and we may choose to keep
or remove the wicks. As a result, the renko bars will again look as
traditional renko bars, but eliminating most of the unwanted properties.
7

This is the same chart as shown above, but with a chart style applied. The
chart style has the genuine open replaced with a fake open and the upper
and lower wicks have been removed.

Selecting the ratio between trend and reversal offset


Classic renko bars have a fixed ratio of 1:2 between the size of the trend
offset and the reversal offset. A trend continuation bar closes after price
has moved in the direction of the prior trend by an amount equal to the
brick size. Conversely, completion of a reversal bar requires a move of twice
the brick size in the opposite direction. As the ratio for classical renko bars
is always 1:2 only a single parameter – the bricksize – is needed to create
the renko bars.
In the event that a different ratio than 1:2 is used for the renko bars, two
parameters are needed instead of one
- number of ticks required to complete a new continuation bar (tick
trend)
8

- number of ticks required to complete a new reversal bar (tick


reversal)
A renko bar labelled T2R5 sets the ratio between the size of continuation
and reversal bars to 2:5. Because the ratio is higher than 1:2, the chart will
have a higher proportion of trending bars than the classic renko chart.
Increasing the ratio to 1:3 or 1:4 will further increase the proportion of
trending vs. reversal bars displayed on the chart. The picture below shows
the structure of renko bars with a 1:3 ratio.

Some renko bars even use a third parameter for selecting an open offset.
However, such open offsets will produce fake opens and false backtests.
Certain renko bars use the brick size as a parameter instead of a trend or
reversal offset. Although this is feasible, it should be avoided because the
mechanics of renko bars are based on trend and reversal offsets.
9

2. The LizardRenko Bars

The LizardRenko bars were designed for systems trading. Accordingly, the
rules outlined above were adhered to when designing them:
 The opening price is the price of the first transaction of the set.
 The high of the bar is the highest price of all transactions of the set.
 The low of the bar is the lowest price of all transactions of the set.
 The closing price is the price of the last transaction of the set.
 The time stamp of the bar is the time stamp of the last transaction of the
set.
 The volume is the total added volume of all transactions of the set.
These rules partly contradict the traditional renko bars concept, but are
needed to make them suitable for system trading. In particular the
following properties were kept in mind:
- Indicator values are only calculated from real prices as opposed to
fake prices.
- Gaps are not filled with zero volume fake bars.
- The bars are fully backtestable.
- The bars can be used in tick replay and synchronized in multi-bar
series scripts.
A Lizard Renko bar is closed as soon as the target level is reached. New
target levels are then based on the close of the prior bar. Therefore, the
Lizard Renko bars are not grid based and allow for gaps between two bars
when market liquidity is low.

LizardRenko Bars
The Lizard Renko bars are built using two parameters, the tick trend and
the tick reversal, where
- tick trend = number of ticks required to complete a new continuation
bar
- tick reversal = number of ticks required complete a new reversal bar
They do no have a third parameter to set a fake open, because the open is
dependent on the selected chart style.
10

D-Renko, T-Renko and Q-Renko Bars


Other than the LizardRenko bars the package contains three fixed ratio bar
types. These are D-Renko, T-Renko and Q-Renko bars. The fixed ratio for
these bars is set to
- D-Renko (D = Double): ratio = 1:2
- T-Renko (T = Triple): ratio = 1:3
- Q-Renko (Q = Quadruple): ratio = 1:4
Of course, the fixed ratio bar types can also be built with the LizardRenko
bars. For example a LizardRenko T3R6 is identical to a D-Renko T3. A
LizardRenko T4R12 is identical to a T-Renko T4, whereas a LizardRenko
T2R8 is identical to a Q-Renko T2.
The fixed ratio bar types were built for convenience purposes. The
preconfigured bars can easily be added from the dropdown bar types menu,
via the chart tool bar.

Chart Styles
The LizardRenko bar, D-Renko bars, T-Renko bars and Q-Renko bars may
be used with the following chart styles:
- Candlestick, Hollow candlestick
- OHLC, Open/Close
- LizardBrick
- UniBrick
When used with NinjaTrader in-built chart styles, the bars or candles will
show genuine prices, as displayed in the data box. This is different for the
chart styles LizardBrick or UniBrick. Specifically, the chart open, high or low
of the bar will display as genuine renko bars. The adjustment used for
applying the chart styles to the renko bars does not affect the underlying
data or bar properties in any way.
The chart styles LizardBrick and UniBrick do not allow for setting the bar
open via a specific offset. After consideration, we concluded it would not
add value other than simply modify the fake open.
11

Chart Style LizardBrick


The chart style LizardBrick has three submodes:

- Bricks (display of bricks as for classical renko bars)


- Wicks (display of bricks and wicks with real highs and lows)
- BarOpen (display of bricks, wicks and the bar open)

The chart below shows D-Renko bars with the chart style “LizardBrick” in
submode “Wicks”.

All bars show genuine high, low and close prices. The fake open is a design
feature of the chart style. The LizardBrick style replicates the logic of
classical renko bars. For continuation bars, the current bar open is placed at
or near the close of the prior bar. Conversely, for reversal bars the current
bar open is placed at or near the open of the prior bar. The underlying bar
open, shown in the data box, is not affected by the embellishment.
Switching the LizardBrick mode from “Wicks” to “BarOpen” will further add
a little horizontal mark, displaying the genuine opening price.
12

Chart Style UniBrick


The chart style UniBrick comes with similar submodes as the chart style
LizardBrick. Below is the identical chart, this time displayed with the chart
style UniBrick in submode Wicks.

The chart style UniBrick is designed in such a way that all bars display an
identical brick size. This is achieved by selecting an appropriate fake open
price. Again, the underlying bar open shown in the data box is not affected
by redesigning the bar.

3. Quick Start Guide

After downloading the install file for the LT_Renko_Bars, please open the
NinjaTrader 8 Control Center and select Tools -> Import -> NinjaScript
Addon. Then select the install file and import. Once installed, please restart
NinjaTrader so that the chart styles can load. The LizardRenko bars and the
new chart styles are then ready for use.
13

In case that you update the LT_Renko_Bars to a new version, please first
uninstall the prior version of the LT_Renko_Bars via Tools -> Remove Ninja
Script Assembly. Please then import the new install file as explained above.
Once installed, please restart NinjaTrader so that the updated chart styles
can load.

Selecting the Bar Type

Please open a new chart with the DataSeries Type “LizardRenko”. There are
two parameters that can be selected
- tick trend = number of ticks required to complete a new continuation
bar (bar close in the same direction compared to the prior bar)
14

- tick reversal = number of ticks required to complete a new reversal


bar (bar close in the opposite direction compared to the prior bar)

Typically a larger value is used for the tick reversal than for the tick trend.

Selecting the Chart Style

The default chart style for a new LizardRenko chart is the chart style
“LizardBrick” with submode “Wicks”. If you change the chart style to a
different submode, to “UniBrick” or to “Candlestick”, you may do so by
accessing the chart style button directly via the chart tool bar.

When setting the chart style via the chart tool bar, the bars are not reloaded
and indicator values are not recalculated.

The chart style “Candlestick” will always display candles with the genuine
bar open, bar high, bar low and bar close – as displayed in the data box of
the chart. The two renko bar styles will display bars with a modified bar
15

open. However, the modified bar open is only used for displaying the
candles, whereas indicators and backtests will always use the real prices.

Adding the Renko_Tools indicator

The install file further comes with an indicator LT_Renko_Tools, accessible


from the LizardTrader folder of the indicator dialogue box.

The Renko_Tools can be used to display the two alternative target levels for
the next renko bar. The current renko bar will close, when one of the two
target levels is reached. The indicator also comes with sounds alerts which
may be triggered at the completion of the current renko bar.

Furthermore the Renko Tools come with paint bars, which allow for
detecting market conditions when one or more levels of the order book
were skipped. This information can be used to avoid entering positions
when market liquidity has dropped.

The screenshot below shows the target levels for a T-Renko chart.
16

4. Working with LizardRenko Bars

There are a few things that make working with LizardRenko bars easier.
When you open a new chart, NinjaTrader will apply the default chart
template. In the event you use a template for loading different bar types, it
is most likely set to the “Candlestick” chart style.

The chartstyles LizardBrick and UniBrick can be used with the LizardRenko,
D-Renko, T-Renko and Q-Renko bars to obtain the specific design. However,
you may also use them with all other bar types. They will then emulate the
“Candlestick” chart style. Accordingly, you may use LizardBrick or UniBrick
for your default chart template.

Configuring the Chart Tool Bar

You may configure the dropdown menu for bar types to include D-Renko,
T-Renko and Q-Renko bars. You may also preset the bar periods as needed.
17

The LizardRenko bars cannot be preconfigured, because they contain two


separate parameters. You need to select them directly via DataSeries or by
using the Ctrl-F7 shortcut. This is also one of the main reasons why we
added the D-Renko, T-Renko and Q-Renko bars to our Renko package.

Selecting Chart Styles


The chart styles LizardBrick and UniBrick are easiest to access via the
button in the chart tool bar. Through that menu, you may also select three
submodes for each of the chart styles. Furthermore, all Lizard renko bars
types may be used with the CandleStick and OHLC chart styles. The chart
will then display bars with genuine prices.
When switching chart styles or submodes, underlying prices or indicator
values will not be changed. Backtest results will always remain unaffected
by the selected chart style. In other words, chart styles only affect the visual
display of the renko bars or candles.
The chart below displays the T-Renko UniBrick chart style and emulates a
Mean Renko / Median Renko chart.
18

Median Renko and Mean Renko charts have a 1:3 fixed ratio with a reversal
offset 3 times larger than the trend offset. The same applies to T-Renko
bars. When applying the UniBrick chart style to T-Renko bars, the fake open
is located in the middle of the prior bar resulting in a backtestable Median
or Mean Renko bar.
If you wish to emulate other types of renko bars, please get in touch with us
and we will make a suggestion for how to adapt the trend / reversal offsets
and chart style to match your needs.

Setting the Ratio


Traditional renko charts have a fixed 1:2 ratio. Accordingly, the price move
required for completing a new continuation bar is half that of the required
price move for plotting a new reversal bar. By design, renko charts will
therefore have more continuation bars than reversal bars. When the ratio
is increased, the percentage of continuation bars will expand further, giving
the appearance of major trends while eliminating sideways markets. The
below LizardRenko T1R30 with a 1:30 ratio illustrates this effect.
19

The LizardRenko T1R30 draws a new continuation following a 1-tick move,


whereas a new reversal bar requires a price move of 30 ticks against the
current trend. The chart is further embellished with the UniBrick chart
style.
Although these trends are visually appealing, they are not easy to trade.
Trading the downtrend would result in a modest gain of 5 ticks. Taking a
position in the small uptrend that followed would incur a 17 tick loss. In
general, high ratio renko charts should be avoided, unless used for a specific
purpose or trading style.

Widening Bid-Ask Spreads


Although LizardRenko bars look like conventional renko bars during liquid
market conditions, they will appear very different in thin liquidity
scenarios. Let us first have a look at a widening bid ask spread example. The
chart below is a D-Renko with a fixed ratio of 1:2 and comparable to a
traditional renko chart.
20

The LizardRenko bars do not fill the spaces between the bid and ask with
zero volume fake bars. All bars are built from real transactions and real
price action. This is very different from what you would see on a traditional
renko chart. Below is a traditional renko chart with the same resolution,
displaying the same instrument at the same time. Following the rules for
building classic renko bars, all gaps are filled with fake bars.

Numerous fake bars were inserted to create this chart and show an
idealized image of the market. However, the chart is useless for entering or
exiting trades. Out of the 160 price bars, 132 bars are zero volume fake bars
and were inserted to bridge the spread. Visually appealing renko charts that
hide real price action are not helpful for trading. Only genuine prices will let
you know what is going on in the markets.
LizardRenko bars display the genuine spreads and will not fill them with
zero volume fake bars.
21

Intraday Gaps
Traditional renko bars also fill intraday gaps with fake bars. These fake bars
are then used to calculate fake indicator values or fake entry prices for
backtesting. The LizardRenko bars will leave the gap visible on the chart:

5. Applying Indicators to the Lizard Renko Bars

The LizardRenko bars facilitate the application of indicators. All indicators


are calculated from real trade data and therefore return accurate indicator
values.
Indicator values do not depend on the selected chart style and submode.
Whether you display the LizardRenko bars with the chart style CandleStick,
OHLC, LizardBrick or UniBrick has no impact on indicator values. Highs and
lows will be correctly fed into the indicator, regardless of whether the wicks
are displayed or not.
22

Support and Resistance Indicators


Indicators used to determine support and resistance calculate correctly
when applied to LizardRenko bars. The following LizardIndicators library
indicators display accurate values when used with LizardRenko bars:
- Daily high and low
- Floor pivots and Globex pivots
- Rolling pivots
- Fibonacci retracements and projections
- Camarilla pivots
- Fibonacci pivots
- Range projections
The above mentioned Library indicators will typically be off a few ticks
when used with conventional renko bars. This is because conventional
renko bars feed false highs and lows into the indicators.
The chart shown below is a LizardRenko T20R40 YM 12-19 chart on Oct 11,
2019 applying Globex pivots. Yesterday’s high and pivot levels all display
correctly:
23

This is the same indicator applying Globex pivots with in-built renko bars
on a 20-tick brick size:

You may note that the first resistance level R1 is 18 ticks off, whereas the
second resistance level R2 is 35 ticks off. This is because the in-built renko
bars feed false high and low values into the indicator. Therefore you should
not rely on S/R indicators when using in-built renko bars.

Indicators Using OHL Data


All indicators that use bar open, bar high or bar low (OHL) as input data do
not return correct values when applied to conventional renko bars. For
example a Stochastics indicator will exaggerate overbought and oversold
values when applied to in-built renko bars. At the same time the average
true range (ATR) will be underestimated. The zigzag indicator will show
false highs and lows, because the real bar high and low is not accessible.
24

The LizardRenko bars supply real OHL values and thus all indicator values
are correctly calculated. Below is a sample chart for a zigzag indicator
applied to LizardRenko bars:

Although the wicks are not shown, swing highs and swing lows are
correctly displayed.

Filters and Moving Averages


Renko bars expand trends and compress sideways price action. This means
that indicators take a larger fraction of input data from trending bars and a
smaller fraction of input data from reversal bars representing range bound
markets. As a result, linear filters and moving averages will adapt and show
a similar behavior as the Kaufman Adaptive Moving Average (KAMA) or
Chande’s Variable Index Dynamic Average (VIDYA).
25

The chart below compares a KAMA applied to a 10-minute chart with an


EMA applied to a LizardRenko T5R10 chart.

6. The Renko Tools

The LizardRenko bars come with the indicator LT_Renko_Tools. It is


installed along with the Renko bars and accessible from the LizardTrader
folder in the indicator dialogue box.
The Renko Tools can be used to show the projected high and low for the
current bar. It may furthermore be used to identify the current renko trend
and monitor market liquidity. The Renko Tools can also be accessed
through other indicators and/or strategies.
26

Projected High and Low


The Renko Tools indicator calculates the projected high and low for the
current renko bar. The projected high holds the target level required for an
upclose, the projected low holds the target level required for a downclose.
If the prior bar was an upclose, the projected high is calculated by adding a
continuation offset (tick trend) to the prior close. The projected low is
calculated by subtracting the reversal offset (tick reversal) from the prior
close. Conversely, if the prior bar was a downclose, the projected high is
calculated by adding a reversal offset to the prior close. The projected low is
calculated by subtracting the continuation offset from the prior close.

If the “Break at EOD” property is activated in the Data Series settings, the
renko bars will reset at the beginning of the daily session. For the first bar
of the session there will be no carry over from the prior session. The
projected high and low are not dependent on the prior close. The projected
high is obtained by adding the continuation range to the open price of the
new session, whereas the projected low is obtained by subtracting the
27

continuation range from the open price. The first bar of the session is the
only bar, where the projected high and low are at an equal distance from
the reference value, seeing that the direction of the prior bar is not taken
into account.
Projected high and low values are always displayed for the last bar on the
chart. When the Renko Tools are set to Calculate.OnBarClose, the values are
calculated from the current close of the second, but last bar on the chart.
This approach is feasible as long as the prior close is used as a reference
value for the next bar’s projections. The only exception is the first bar of the
daily session. Hence, no projection high or low will be displayed for the
first bar of the daily session, when the indicator is set to
Calculate.OnBarClose. Therefore, it is recommended to use the Renko Tools
with setting Calculate.OnEachTick or Calculate.OnPriceChange.

Accessing the Projected High and Low in Automated Strategies


The below Renko Tools plots may also be called in programming scripts for
automated strategies:
- ReferenceValue: prior close for most of the bars, but current open for
the first bar of the session
- ProjectionHigh: upper target for the completion of the current bar
- ProjectionLow: lower target for the completion of the current bar
- BarClose: Close of the current bar
- NextBarProjectionHigh: upper target for the next bar
- NextBarProjectionLow: lower target for the next bar
- IsBarComplete: holds the value +1, when one of the target levels has
been reached, 0 otherwise
The ReferenceValue, ProjectionHigh and ProjectionLow are set with the
first tick of each bar. Upon reaching the upper or lower target level, the
BarClose, NextBarProjectionHigh and NextBarProjectionLow are set with
the last tick of each bar. You should therefore only use these DataSeries,
once IsBarComplete has reached the value +1. All renko bars will eventually
reach one of their target levels. Again, the the only exception is the last bar
of the daily session which, in the event that the “Break at EOD” property has
been activated, will be truncated. If that is the case, the last bar of the
session remains incomplete and IsBarComplete remains set to 0.
Accordingly, the values for BarClose, NextBarProjectionHigh and
NextBarProjectionLow are not set.
28

When the Renko Tools are set to Calculate.OnPriceChange or


Calculate.OnEachTick, the ProjectionHigh and ProjectionLow can be used
for entering/exiting positions with stop orders. The property
IsBarComplete can be used to trigger an entry after the last tick of the
current bar, instead of waiting for the first tick of the next bar.
When the Renko Tools are set to Calculate.OnBarClose,
NextBarProjectionHigh and NextBarProjectionLow can be used for
entering/exiting positions with a stop order. The property IsBarComplete
should be used to determine whether NextBarProjectionHigh and
NextBarProjectionLow contain values that can be used for stop orders.

Bar Direction and Renko Trend


Bar direction refers to the developing direction of the current renko bar.
When the current close is above the open, the bar direction is up. When the
current close is below the open, the bar direction is down. Should the
current open and close values be equal, the bar direction will be determined
by the prior close.
29

At the bar open, the current renko trend is determined by the direction of
the prior bar. The renko trend does not change until the current bar is
complete. If the current bar is a continuation bar, or in the event that the
current bar remains incomplete (last bar of session), the trend remains
intact. Otherwise the trend will reverse with the last tick of the reversal bar.
In the chart above, the reversal bar down has not yet completed and the
renko bars are still in an uptrend, whereas the bar direction of the last bar
is down.

Market Structure, Minor and Major Trend


The Renko Tools may also be used for analyzing minor and major market
trends. For this purpose, the indicator comes with an option to display
swing legs, connecting swing highs and lows in a zigzag line. The zigzag line
is based on the bar closes and does not take into account the bar highs and
lows.
The minor trend reveals the direction of the current swing leg and will
typically change direction following a renko reversal bar. By selecting
“Minor_Trend”, it may be displayed with paint bars or background shading.
Most of the time, the minor trend – based on the direction of the current
swing leg – will be identical to the renko trend, which is based on the last
reversal bar. The only exception is for charts that have the “BreakAtEOD”
option activated. Because the renko bars will reset at the beginning of the
new session, it is possible that the renko trend changes prior to the minor
trend as indicated by the swing leg. Specifcally, at the outset of a new
trading session, the renko trend will follow the bar direction, even if the
target for a reversal has not yet been reached.
The indicator furthermore comes with an option to display reversal signals.
A reversal signal will plot when a new leg is added to the last swing point,
reflecting a change in the minor trend. As mentioned, such signals will
coincide with renko reversal bars, except for initial signals that plot on a
new trading session.
The major trend is based on the market structure. An uptrend starts with a
higher high, followed by a higher low and higher highs. A downtrend starts
with a lower low, followed by a lower high and lower lows. By selecting
“Major_Trend”, it may be displayed with paint bars or background shading.
30

Renko Tools applying paint bars to identify the major trend.

Accessing Bar Direction, Trend and Signals Programmatically


The Renko Tools come with the following properties for determining bar
direction, renko trend, market trend and reversal bars:
- BarDirection: +1 for upclose, - 1 for downclose, 0 otherwise
- RenkoTrend: +1 for uptrend, -1 for downtrend
- MinorTrend: +1 for uptrend, -1 for downtrend
- MajorTrend: +1 for uptrend, -1 for downtrend
When a renko bar is complete, it is also possible to determine the bar type.
Possible bar types are bullish reversal bar, bearish reversal bar, bullish
continuation bar and bearish continuation bar. The bar type is not available
for developing bars. For the last bar of the session no bar type is
determined if truncated prior to reaching one of the two projection levels.
31

The Renko Tools come with the following public properties for accessing
bar types and reversal signals:
- IsBullishContinuationBar: +1 for bullish continuation, 0 otherwise
- IsBearishContinuationBar: +1 for bearish continuation, 0 otherwise
- IsBullishReversalBar: +1 for bullish reversal, 0 otherwise
- IsBearishReversalBar: +1 for bearish reversal, 0 otherwise
- BullishSignal: +1 for a bullish reversal signal, 0 otherwise
- BearishSignal: +1 for a bearish reversal signal, 0 otherwise
Bullish and bearish signals coincide with bullish and bearish reversal bars
in most cases. Again, an exception can be observed at the beginning of a
new trading session. If the first reversal signal is triggered by a continuation
bar, the first reversal bar may not trigger a reversal signal. In line with the
bar types, bullish and bearish signals are available with the last tick of each
bar, as soon as one of the projection levels has been reached.

Market Depth
The Renko Tools also allow for identifying increasing bid-ask spread
scenarios, or visualizing situations where one or several order book levels
are skipped. This may occur when certain order book levels are empty, or
when a large incoming market order sweeps one or several levels.

Specifically, the Renko Tools will detect a thin market

- when there is a gap of more than 1 tick between the close of a renko
bar and the opening price of the next renko bar
- when a renko bar closes above the projected high or below the
projected low (i.e. when no transaction occurred at the target levels)

However, for certain instruments, such as FOREX instruments that trade at


1/10th of a pip, a single skipped level may not be significant. The default
value for the number of skipped levels can be adjusted to a higher value,
such as 3 or 4, if appropriate. The Renko Tools will then only detect market
conditions where transaction prices skip 4 or 5 ticks in a single step.
32

Thin or illiquid or market scenarios may be displayed with paintbars or


background shading. The indicator also comes with a sound file for audio
alerts of such scenarios. The below LizardRenko chart shows an example
taking place during a news release. The Renko Tools detect abnormal
market conditions, plotting blue and yellow bars.

Finally, the Renko Tools also come with a public property MarketDepth,
accessible via an indicator or strategy.

- MarketDepth: +1 one for a liquid market, 0 when the renko bars are
gapping up or down, or when one or several levels of the order book
have been skipped
The indicator can thereby detect abnormal market conditions. This
information in turn can be used for temporarily invalidating trade setups,
entry and exit signals, until the market returns to a normalcy.
The below example shows a situation where the Renko Tools detect an
exaggerated algorithmic pattern with increased bid-ask spreads.
33

Market Speed and Latency


As with point and figure charts, Renko bars completely eliminate time,
Renko charts only show price moves and following a news release,
hundreds of new renko bars may plot in the course of seconds. Therefore,
retail traders need to take into account the aggregated response time, often
referred to as latency. To the point, one should avoid trading setups where
latency may be an issue.

There are two main causes for latency:

- Latency of the data feed: Trade data is collected by the exchange and
passed on to the data provider who sends it to its subscribers (retail
traders). The data is then processed by the CPU and displayed on the
trader PC. Once on the monitor, the trade data typically has a delay of
between 50 and 150 milliseconds.
34

Latency of order execution: When an order is generated by the


trading software, it is first sent to a broker access point. The order is
then checked against the margin requirements, and then sent on to
the exchange. This may cause an additional delay of between 100 and
300 milliseconds, depending on the location of the trading PC, the
broker access point and the location of the exchange.

Aggregate latency is then the sum of the data feed latency and the latency of
order execution. If the market moves faster than the aggregate latency,
order execution may be delayed by a few bars and cause increased
slippage.

To deal with increased slippage during fast markets, the Renko Tools come
with a feature that allows for specifying an aggregate latency threshold.
Latency then compared to the difference between two consecutive renko
bar time stamps. Should the difference be less than the latency, a fast
market threshold is reached as displayed via paint bars or background
shading. The chart below show ‘normal’ market conditions that occurred
over several hours, then followed by a 100 seconds fast market period.
35

Short Reference Guide for Renko Tools

Group Parameters Allowable Description


Values
Renko Show projection True, False Activates the projection
Projections levels high and projection low
plots.
Show reference True, False Activates the plot for the
value reference value (prior close
or current open).
Show labels True, False Activates label for
projection plots and
prior close.
Market Sensitivity DB/DT Integer >= 0 Sets the maximum tolerated
Structure difference in ticks for
double bottoms and double
tops.
Market Skipped tick levels Integer > 0 Sets the minimum number
Depth of successive levels of the
order book for which no
transactions have printed.
Market Latency (msec) Integer > 0 Sets the latency for the alert
Speed triggered when bar speed is
faster than the latency.
Display Show swing dots True, False Adds swing dots at the bar
Options close preceding reversal
bars.
Show swing labels True, False Adds labels “HH”, “DT”,
“HL”,
“LL”, “DB”, “HL” for
identifying the current
trend.
Show leg size True, False Shows the size of a swing
leg in points.
Show leg volume True, False Shows the volume of a
swing leg.
Volume format Cumulated, Selectable options for
Volume_per_bar displaying the volume of a
Volume_per_tick swing leg.
Show zigzag True, False Shows the zigzag indicator
connecting highs and lows.
Reversal signals True, False Activates signals for renko
reversal bars.
Show paintbars True, False Activates the paint bars.
36

Group Parameters Allowable Description


Values
Display Paintbar Major_Trend, Allows for setting paint bars
Optons information Minor_Trend, to display major or minor
Market_Depth, trend, a thin order book or a
Market_Speed fast market.
Background True, False Activates the background
shading shading.
Background Major_Trend, Allows for selecting
information Minor_Trend, background shading to
Market_Depth, display major or minor
Market_Speed trend, a thin order book or a
fast market.
Show parameter True, False Activates display of
list NinjaScript parameters in
brackets after indicator
name.

7. Accessing the Renko Bars via NinjaScript

The LizardRenko, D-Renko, T-Renko and Q-Renko bars are fully


synchronizable and can be called from a NinjaScript indicator or strategy as
a secondary bar series.
This can be done by adding the NinjaScript method AddDataSeries() in
OnStateChange() as soon as State == State.DataLoaded has been reached.
The Renko bars are registered as
LizardRenko: BarsPeriodType = (BarsPeriodType)12490
D-Renko: BarsPeriodType = (BarsPeriodType)12492
T-Renko: BarsPeriodType = (BarsPeriodType)12493
Q-Renko: BarsPeriodType = (BarsPeriodType)12494

Example: Adding LizardRenko T5R10 bars to an indicator or strategy


if (State == State.Configure)
{
AddDataSeries(new BarsPeriod(){BarsPeriodType = (BarsPeriodType)
12490, Value = 5, Value2 = 10});
37

Example: Adding D-Renko T8 bars to an indicator or strategy


if (State == State.Configure)
{
AddDataSeries(new BarsPeriod(){BarsPeriodType = (BarsPeriodType)
12492, Value = 8});
}

Example: Adding T-Renko T6 bars to an indicator or strategy


if (State == State.Configure)
{
AddDataSeries(new BarsPeriod(){BarsPeriodType = (BarsPeriodType)
12493, Value = 6});
}

Example: Adding Q-Renko T4 bars to an indicator or strategy


if (State == State.Configure)
{
AddDataSeries(new BarsPeriod(){BarsPeriodType = (BarsPeriodType)
12494, Value = 4});
}

8. Backtesting and Automated Trading

The LizardRenko, D-Renko, T-Renko and Q-Renko bars were specifically


designed for systems trading and are fully backtestable. The bars
themselves are built from genuine trade data, making them as reliable for a
backtest as tick bars or minute bars.
The chart styles LizardBrick and UniBrick can be considered as different
jackets for the price bars, making them easier to read. The chart styles do
not affect the underlying bars and data as shown in the data box and as
used for backtesting. Therefore strategy backtests do not depend on the
selected chart style.
38

Backtesting
LizardRenko, D-Renko, T-Renko and Q-Renko bars are fully backtestable,
because
- all data used for backtesting is based on real transactions
- indicators do not calculate values from zero volume bars, but only rely
on real trade data as input series
- simulated fills for market orders only use genuine open prices

LizardRenko bars also show genuine highs and lows, as opposed to the
fictitious highs and lows found in the NinjaTrader in-built renko bars.

Sample Backtest with 10-Renko bars


NinjaTrader ships with a Sample MA Crossover Strategy. This strategy is a
trend following stop-and-reverse strategy based on SMA(10) vs. SMA(25)
crossovers. We backtested that strategy on tick data for ES for the first 6
months of 2019.
Inbuilt 10-Renko bars: The strategy backtest shows a profit of USD 10,300
with a profit factor of 1.17 for 219 trades.
D-Renko T10 bars: The strategy backtest shows a profit of USD 400 with a
profit factor of 1.01 for 217 trades.
While the actual trades entered in both cases are similar, only the second
backtest with D-Renko bars is realistic. The first backtest with the in-built
renko bars is mainly distorted by false open prices.

Multi-Bar-Series Scripts
The LizardRenko, D-Renko, T-Renko and Q-Renko bars are fully
synchronizable, because they do not use ‘RemoveLastBarSupported’ as the
in-built renko bars, and because the time stamp of the bar is the time stamp
of the last transaction covered by the bar. This is not true for most of the
other renko bar types available for NinjaTrader.
The LizardRenko, D-Renko, T-Renko and Q-Renko bars may therefore be
used in multi-bar-series and multi-timeframe scripts without any
restrictions.

You might also like