Renko Trading: Charts, Statistics and Python

Compare brick sizes on one price path, explore historical forex and crypto statistics, and test Renko signals in Python.

Tools

Research

Practical guides and Python

Advanced guides

One price path, different bricks

Synthetic BTC example in USD. Both charts share a price scale. Change the 60 and 120 USD defaults or replay one observation at a time.

A

B

How is a Renko brick formed?

A time candle summarizes a fixed interval. A Renko brick forms when an observed price reaches or crosses a fixed threshold. Here the first observation sets the anchor. Later bricks use the most recent brick close as their reference.

Continuation, reversal and price gaps

With a brick size of 10 and a starting price of 100, a price of 110 makes the first up brick. A price of 120 makes the next one. A decline to 110 leaves the trend intact. At 100 the first down brick runs from 110 to 100. This two-brick reversal rule keeps consecutive bricks from overlapping.

A price gap can generate several bricks at once. They share the same source observation and are stacked in one column in the demo. The dashed line shows observed prices, and the colored blocks show the bricks.

Fixed size, percentages and ATR

A fixed absolute size is directly reproducible. A size derived from a starting percentage remains fixed during the run. An ATR-based variant also depends on lookback, data resolution and when size is recalculated. Set those rules before comparing results.

Data resolution and execution

Daily and second-level samples can omit movements between observations. Tick sequences preserve the order of the observed prices. OHLC highs and lows alone do not identify which threshold was hit first. Bricks provide signals. The Python example fills a signal at the next observed bid or ask at the earliest, including modeled costs.

TradingView documentation on Renko and synthetic prices

Renko Studies

Compare trade ticks and one-second prices

One sequence of BTC/USD trades, two resolutions and six brick sizes.

What do historical forex and crypto data show?

In this quarter, a size of 0.50% of the first observation produces 19 EUR/USD bricks, 383 BTC/USDT bricks and 495 ETH/USDT bricks.

Window: 1 October through 31 December 2024. Forex uses available New York noon rates. Crypto uses Bybit spot daily UTC closes, including weekends. Missing FX values are omitted. The first value is the anchor. Sizes are 25, 50 and 100 basis points of the initial quote, rounded to four decimal places for EUR/USD and two for crypto. They remain fixed throughout.

Renko from daily observations in Q4 2024
MarketObservationsSize (bp)Brick sizeBricksUp / downReversalsDays with bricksMedian run
EUR/USD62250.0028439 / 348283
EUR/USD62500.0055193 / 164143
EUR/USD621000.011160 / 6066
BTC/USDT9225152.03834524 / 310338015.5
BTC/USDT9250304.06383245 / 138276911.0
BTC/USDT92100608.12166110 / 5621585.5
ETH/USDT92256.121066606 / 460408017
ETH/USDT925012.24495284 / 21136748
ETH/USDT9210024.48215126 / 8924636

Counts cover completed bricks, reversals between consecutive bricks and observations with at least one brick. Median run includes initial and final runs in the same-direction sequence. Different sampling calendars and observation times limit cross-market comparisons. The statistics describe this quarter and do not measure trading returns or intraday activity.

Sources: Federal Reserve / FRED DEXUSEU ยท Bybit Spot Kline API

Python code for Renko backtests and paper bots

The standard-library example reads chronological bid and ask quotes. Their midpoint forms fixed-size bricks. Once the EMAs warm up, the strategy switches between long and flat. Bricks from one observation are processed together. The simulator buys at the next ask and sells at the next bid, with adverse slippage and fees on each side. It reports open positions and unfilled signals at the end of the data.

Paper mode accepts the same CSV over standard input. It emits signals and simulated executions as JSON lines. A separate data adapter can write the rows. The example uses no account credentials.

python renko_lab.py backtest renko-demo-quotes.csv --size 60 --fast 3 --slow 6
python renko_lab.py paper - --size 60 --fast 3 --slow 6
python renko_research.py

Feed paper mode from a process that emits timestamp,bid,ask as its first line. The research script re-fetches both data sources and needs internet access.

Explore the Backtesting Lab