Skip to content

Renko Chart ​

The Renko Chart is a Japanese price transformed candlestick pattern that uses "bricks" to show a defined increment of change over a non-linear time series. Transitions can use either Close or High/Low price values. An ATR variant is also provided where brick size is determined by current Average True Range values. [Discuss] 💬

csharp
// C# usage syntax (fixed brick size)
IReadOnlyList<RenkoResult> results =
  bars.ToRenko(brickSize, endType);

// C# usage syntax (ATR-derived brick size — Series only)
IReadOnlyList<RenkoResult> results =
  bars.ToRenkoAtr(atrPeriods, endType);

Parameters ​

paramdescription
endType
EndType
Price threshold used to spawn new bricks, on both variants. Default is EndType.Close

Fixed brick size ​

paramdescription
brickSize
decimal
Brick size. Must be greater than 0.

ATR-derived brick size ​

paramdescription
atrPeriods
int
Number of lookback periods (A) for ATR evaluation. Must be greater than 1. Default is 14.

Historical price bars requirements ​

Fixed brick size: You must have at least two periods of bars to cover the warmup periods; however, more is typically provided since this is a chartable candlestick pattern.

ATR-derived brick size: You must have at least A+100 periods of bars.

bars is a collection of generic TBar historical price bars. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.

EndType enum options ​

enum / valuedescription
EndType.Close
0
Threshold measured from bar Close price
EndType.HighLow
1
Threshold measured from bar High and Low price

Response ​

csharp
IReadOnlyList<RenkoResult>
  • This method returns a time series of all available indicator values for the bars provided.
  • It does not return a single incremental indicator value.
  • RenkoResult is based on IBar, so it can be used as a direct replacement for bars.
  • Each result record represents one Renko brick.

🚩 Fewer results than bars

Unlike most indicators in this library, this indicator DOES NOT return the same number of elements as there are in the historical price bars. Renko bricks are added to the results once the brickSize change is achieved. For example, if it takes 3 days for a $2.50 price change to occur an entry is made on the third day while the first two are skipped. If a period change occurs at multiples of brickSize, multiple bricks are drawn with the same Timestamp. See online documentation for more information.

🖌️ Repaint warning (ATR variant)

When using the ToRenkoAtr() variant, the last Average True Range (ATR) value is used to set brickSize. Since the ATR changes over time, historical bricks will be repainted as new periods are added or updated in bars.

RenkoResult ​

propertydescription
Timestamp
DateTime
Formation date of brick(s)
Open
decimal
Brick open price
High
decimal
Highest high during elapsed bars periods
Low
decimal
Lowest low during elapsed bars periods
Close
decimal
Brick close price
Volume
decimal
Sum of Volume over elapsed bars periods
IsUp
bool
Direction of brick (true=up,false=down)

🚩 Multiple bricks per period

When multiple bricks are drawn from a single bar period, the extra information about High and Low wicks and Volume is potentially confusing to interpret. High and Low wicks will be the same across the multiple bricks; and Volume is portioning evenly across the number of bricks. For example, if within one bar period 3 bricks are drawn, the Volume for each brick will be (sum of bars Volume since last brick) / 3.

Utilities ​

See Utilities and helpers for more information.

Chaining ​

Results are based in IBar and can be further used in any indicator.

csharp
// example
var results = bars
    .ToRenko(..)
    .ToRsi(..);

This indicator must be generated from bars and cannot be generated from results of another chain-enabled indicator or method.

See Chaining indicators for more.

Streaming ​

Fixed brick size only — Streaming implementations are available for the fixed brick size variant only.

Use a BufferList for incremental processing:

csharp
RenkoList buffer = new(brickSize, endType);

// call from your WebSocket or SSE message handler
void OnBarReceived(IBar bar) => buffer.Add(bar);

// results fill as the handler runs
IReadOnlyList<RenkoResult> results = buffer;

Subscribe to a BarHub for advanced streaming scenarios:

csharp
BarHub barHub = new();
RenkoHub observer = barHub.ToRenkoHub(brickSize);

// call from your WebSocket or SSE message handler
void OnBarReceived(IBar bar) => barHub.Add(bar);

// results fill as the handler runs
IReadOnlyList<RenkoResult> results = observer.Results;

🚩 No streaming support

ToRenkoAtr() does not support streaming. The ATR brick size is derived from the full dataset and changes as new bars are added, making incremental output undefined. Use the Series implementation with periodic recalculation instead.

See Buffer lists and Stream hubs for full usage guides.