Documentation / @finchart/indicators / renko
Function: renko()
renko(
source,options):RenkoBrick[]
Defined in: indicators/src/renko.ts:124
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 — because past that a brick is under the doubles' own spacing at that price and adding one would leave the level where it was (a brick of 1,638 on a price of 10²⁰ is such a brick); the same door pointAndFigure keeps for its boxes.
Parameters
source
readonly OHLC[]