pub fn to_renko_bricks(bars: &[Bar], config: &RenkoConfig) -> Vec<RenkoBrick>Expand description
Transform bars into Renko bricks
The first brick is drawn once a close moves one brick either way from the first close rounded down to a multiple of the brick size. After that, a brick continues the trend when a close reaches one brick beyond the last brick’s close, and reverses it when a close reaches one brick beyond the last brick’s open, so a reversal needs a two-brick move.
Returns no bricks when the brick size is not a positive finite number.
§Safety Limits
- When the bars move by more than two million brick sizes, the bricks are built from the latest bar after which they move at most that much
- At most the newest 10,000 bricks