OPEN-SOURCE SCRIPT
Renko Boxes [LuxAlgo]

The Renko Boxes indicator provides an overlay-based Renko charting experience that uses Average True Range (ATR) to dynamically define brick sizes, allowing traders to filter out market noise and focus on significant price movements directly on their main candles.
🔶 USAGE
Unlike traditional Renko charts that exist on a separate time-independent scale, this tool overlays Renko price levels onto the standard candlestick chart. This allows you to see how the underlying price action interacts with the Renko "bricks" in real-time.
The indicator is primarily used to identify trend direction and potential reversal points. When price exceeds a specific threshold (determined by the ATR-based brick size), a new box is formed.
🔹 Trend Interpretation
🔹 Visual Elements
The script includes several visual components to aid in chart analysis:
🔶 DETAILS
The core logic of the script relies on a calculated "Brick Size" derived from the ATR. By using ATR, the sensitivity of the Renko boxes automatically adjusts to the asset's current volatility.
A reversal occurs when the price moves in the opposite direction of the current trend by a distance greater than the specified brick size. If price jumps significantly (gaps or high-momentum moves), the script is designed to calculate the number of bricks covered and adjust the levels accordingly to maintain price integrity.
🔶 SETTINGS
🔹 Renko Settings
🔹 Visuals
🔶 USAGE
Unlike traditional Renko charts that exist on a separate time-independent scale, this tool overlays Renko price levels onto the standard candlestick chart. This allows you to see how the underlying price action interacts with the Renko "bricks" in real-time.
The indicator is primarily used to identify trend direction and potential reversal points. When price exceeds a specific threshold (determined by the ATR-based brick size), a new box is formed.
🔹 Trend Interpretation
- Bullish Trend: Represented by green boxes and a green dotted average line. This occurs when price consistently breaks above the upper threshold of the previous brick.
- Bearish Trend: Represented by red boxes and a red dotted average line. This occurs when price consistently breaks below the lower threshold of the previous brick.
🔹 Visual Elements
The script includes several visual components to aid in chart analysis:
- Renko Boxes: Shaded areas representing the current price bracket. These use the __BLOCK_0__ property to ensure clean transitions without "bleeding" between different price levels.
- Reversal Dots: Circular markers that appear specifically when the Renko direction switches from bullish to bearish or vice versa.
- Average Line: A dotted line following the median price of the current Renko level, serving as a smoothed trend tracker.
🔶 DETAILS
The core logic of the script relies on a calculated "Brick Size" derived from the ATR. By using ATR, the sensitivity of the Renko boxes automatically adjusts to the asset's current volatility.
A reversal occurs when the price moves in the opposite direction of the current trend by a distance greater than the specified brick size. If price jumps significantly (gaps or high-momentum moves), the script is designed to calculate the number of bricks covered and adjust the levels accordingly to maintain price integrity.
🔶 SETTINGS
🔹 Renko Settings
- ATR Length: Determines the lookback period used to calculate the Average True Range, which sets the baseline for volatility.
- ATR Multiplier: Adjusts the sensitivity of the bricks. A higher multiplier creates larger bricks (filtering more noise), while a lower multiplier creates smaller bricks (showing more detail).
🔹 Visuals
- Bullish Color: Defines the color for boxes and lines when the Renko trend is up.
- Bearish Color: Defines the color for boxes and lines when the Renko trend is down.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
All content & scripts provided by LuxAlgo are for educational purposes only and are not financial advice.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
All content & scripts provided by LuxAlgo are for educational purposes only and are not financial advice.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.