Renko bricks
All indicators

LibraryTrend

Indicator

Renko bricks

Renko bricks: a brick of fixed size each time the close has moved that far, ignoring time, so only moves of at least one brick show.

TrendOn the price4 inputsRenko

How it is calculated

The size is the fixed size, or ATR(atr_length) times atr_mult taken once, at the first bar with an ATR above zero. That bar's close is the anchor; brick edges sit on anchor plus k times size. A brick in the same direction needs a close one size beyond the last brick's close, a reversal two sizes, that is one beyond its open. A close within 0.0000001 of a brick of an edge counts as on it.

Reference: Renko from closes with a two brick reversal (Nison 1994)

How to read it

The bricks come from closes only, and a brick is final at the close of the bar that made it: one bar can add several. direction is +1 or -1 for the last brick, run counts bricks in a row, reversal is 1 on a bar that turned. A fixed size is in price units, so it must suit the instrument: 0.001 is 10 pips on EURUSD.

In a strategy

Trading the turns: with r = ctx.ind("renko", mode="atr", atr_length=14, atr_mult=1.0) go long when r.reversal is 1 and r.direction is +1, short when it is -1, the stop at r.brick_open minus one r.size.

Inputs

InputTypeDefaultRange or choices
Brick sizemodeChoice"atr"ATR, Fixed
Fixed size (price)sizeNumber0.001min 0.00001, max 100000
ATR lengthatr_lengthWhole number14min 1, max 500
ATR multipleatr_multNumber1min 0.01, max 50

What it draws

LineDrawn as
Brick closeSteps
Brick openSteps

Used in

No strategy template reads it yet.

OrionQuant