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
| Input | Type | Default | Range or choices |
|---|---|---|---|
Brick sizemode | Choice | "atr" | ATR, Fixed |
Fixed size (price)size | Number | 0.001 | min 0.00001, max 100000 |
ATR lengthatr_length | Whole number | 14 | min 1, max 500 |
ATR multipleatr_mult | Number | 1 | min 0.01, max 50 |
What it draws
| Line | Drawn as |
|---|---|
| Brick close | Steps |
| Brick open | Steps |
Used in
No strategy template reads it yet.