Documentation / @finchart/indicators / renko
Function: renko()
renko(
source,options):RenkoBrick[]
Defined in: indicators/src/renko.ts:125
Traditional Renko, close-based. One brick per brickSize in the same direction, a reversal takes 2×brickSize — a reversal brick opens one gap away from the prior close (the classic rule). The first breakout sets the direction. Boundaries use the shortest decimal spellings of the initial close, each close, and brickSize: 0.3 reaches three 0.1 bricks, but the immediately preceding double does not. Prices are rounded from that integer grid once, rather than accumulated by repeated addition; reaching the rounded grid price also reaches the boundary. Subnormal brick sizes use exact binary units instead: their shortest decimal spelling can have too few digits to preserve a long run's brick count.
A close 2⁴⁷ bricks or more from zero cannot be laid — ContractError. 2⁴⁷ is a margin: inside it a brick is at least ~32× the doubles' spacing at that price, so brick prices stay distinct. Well past it they round onto each other (a brick of 1,638 on a price of 10²⁰, a tenth of the spacing, would lay mostly flat bricks). The same door pointAndFigure keeps for its boxes.
Parameters
source
readonly OHLC[]